Sha256: dae8bfabd67c8a96ee526a93cd0062678416cc9918c2b7c48a98154100e8a860

Contents?: true

Size: 1019 Bytes

Versions: 39

Compression:

Stored size: 1019 Bytes

Contents

import{parser as e}from"@lezer/yaml";import{delimitedIndent as n,indentNodeProp as o,foldInside as r,foldNodeProp as t,LRLanguage as l,LanguageSupport as a}from"@codemirror/language";const i=l.define({name:"yaml",parser:e.configure({props:[o.add({Stream:e=>{for(let n=e.node.resolve(e.pos,-1);n&&n.to>=e.pos;n=n.parent){if(n.name=="BlockLiteralContent"&&n.from<n.to)return e.baseIndentFor(n);if(n.name=="BlockLiteral")return e.baseIndentFor(n)+e.unit;if(n.name=="BlockSequence"||n.name=="BlockMapping")return e.column(n.from,1);if(n.name=="QuotedLiteral")return null;if(n.name=="Literal"){let o=e.column(n.from,1);if(o==e.lineIndent(n.from,1))return o;if(n.to>e.pos)return null}}return null},FlowMapping:n({closing:"}"}),FlowSequence:n({closing:"]"})}),t.add({"FlowMapping FlowSequence":r,"BlockSequence BlockMapping BlockLiteral":(e,n)=>({from:n.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*[\]\}]$/}});function yaml(){return new a(i)}export{yaml,i as yamlLanguage};

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
satis-2.1.47 vendor/javascript/@codemirror--lang-yaml.js
satis-2.1.46 vendor/javascript/@codemirror--lang-yaml.js
satis-2.1.45 vendor/javascript/@codemirror--lang-yaml.js
satis-2.1.44 vendor/javascript/@codemirror--lang-yaml.js
satis-2.1.43 vendor/javascript/@codemirror--lang-yaml.js
satis-2.1.42 vendor/javascript/@codemirror--lang-yaml.js
satis-2.1.41 vendor/javascript/@codemirror--lang-yaml.js
satis-2.1.40 vendor/javascript/@codemirror--lang-yaml.js
satis-2.1.39 vendor/javascript/@codemirror--lang-yaml.js
satis-2.1.38 vendor/javascript/@codemirror--lang-yaml.js
satis-2.1.37 vendor/javascript/@codemirror--lang-yaml.js
satis-2.1.36 vendor/javascript/@codemirror--lang-yaml.js
satis-2.1.35 vendor/javascript/@codemirror--lang-yaml.js
satis-2.1.33 vendor/javascript/@codemirror--lang-yaml.js
satis-2.1.31 vendor/javascript/@codemirror--lang-yaml.js
satis-2.1.30 vendor/javascript/@codemirror--lang-yaml.js
satis-2.1.29 vendor/javascript/@codemirror--lang-yaml.js
satis-2.1.28 vendor/javascript/@codemirror--lang-yaml.js
satis-2.1.27 vendor/javascript/@codemirror--lang-yaml.js
satis-2.1.26 vendor/javascript/@codemirror--lang-yaml.js