fix: small fix to heredoc endCaptures.

This commit is contained in:
James Harton 2023-02-20 12:14:40 +13:00
parent 21a0d9222d
commit a46f86088e
2 changed files with 417 additions and 378 deletions

View file

@ -1,348 +1,385 @@
{
"scopeName": "source.elixir.cinder",
"injectionSelector": "L:source.elixir",
"name": "elixir-cinder",
"patterns": [{
"comment": "Handlebars markdown fragment",
"name": "text.html.handlebars",
"begin": "\\s?(```(handlebars|hbs))$",
"beginCaptures": {
"0": {
"name": "comment.documentation.heredoc.elixir"
}
},
"end": "^\\s*?```$",
"endCaptures": {
"0": {
"name": "comment.documentation.heredoc.elixir"
}
},
"patterns": [{
"include": "text.html.handlebars"
}]
},
{
"comment": "Handlebars sigil with heredoc (double quotes)",
"name": "text.html.handlebars",
"begin": "\\s?(~B\"\"\")$",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "^\\s*(\"\"\"[a-z]*)$",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "text.html.handlebars"
}]
},
{
"comment": "Handlebars sigil with double quotes",
"name": "text.html.handlebars",
"begin": "~B\\\"",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\\"[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "text.html.handlebars"
}]
},
{
"comment": "Handlebars sigil with square brackets",
"name": "text.html.handlebars",
"begin": "~B\\[",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\][a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "text.html.handlebars"
}]
},
{
"comment": "Handlebars sigil with parentheses",
"name": "text.html.handlebars",
"begin": "~B\\(",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\)[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "text.html.handlebars"
}]
},
{
"comment": "Handlebars sigil with curly braces",
"name": "text.html.handlebars",
"begin": "~B\\{",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\}[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "text.html.handlebars"
}]
},
{
"comment": "JavaScript markdown fragment",
"name": "source.js",
"begin": "\\s?(```(js|javascript))$",
"beginCaptures": {
"0": {
"name": "comment.documentation.heredoc.elixir"
}
},
"end": "^\\s*?```$",
"endCaptures": {
"0": {
"name": "comment.documentation.heredoc.elixir"
}
},
"patterns": [{
"include": "source.js"
}]
},
{
"comment": "JavaScript sigil with heredoc (double quotes)",
"name": "source.js",
"begin": "\\s?(~j\"\"\")$",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "^\\s*(\"\"\"[a-z]*)$",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "source.js"
}]
},
{
"comment": "JavaScript sigil with double quotes",
"name": "source.js",
"begin": "~j\\\"",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\\"[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "source.js"
}]
},
{
"comment": "JavaScript sigil with square brackets",
"name": "source.js",
"begin": "~j\\[",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\][a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "source.js"
}]
},
{
"comment": "JavaScript sigil with parentheses",
"name": "source.js",
"begin": "~j\\(",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\)[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "source.js"
}]
},
{
"comment": "JavaScript sigil with curly brackets",
"name": "source.js",
"begin": "~j\\{",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\}[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "source.js"
}]
},
{
"comment": "TypeScript markdown fragment",
"name": "text.html.handlebars",
"begin": "\\s?(```(ts|typescript))$",
"beginCaptures": {
"0": {
"name": "comment.documentation.heredoc.elixir"
}
},
"end": "^\\s*?```$",
"endCaptures": {
"0": {
"name": "comment.documentation.heredoc.elixir"
}
},
"patterns": [{
"include": "source.ts"
}]
},
{
"comment": "TypeScript sigil with heredoc (double quotes)",
"name": "source.ts",
"begin": "\\s?(~t\"\"\")$",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "^\\s*(\"\"\"[a-z]*)$",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "source.ts"
}]
},
{
"comment": "TypeScript sigil with double quotes",
"name": "source.ts",
"begin": "~t\\\"",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\\"[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "source.ts"
}]
},
{
"comment": "TypeScript sigil with square brackets",
"name": "source.ts",
"begin": "~t\\[",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\][a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "source.ts"
}]
},
{
"comment": "TypeScript sigil with parentheses",
"name": "source.ts",
"begin": "~t\\(",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\)[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "source.ts"
}]
},
{
"comment": "TypeScript sigil with curly brackets",
"name": "source.ts",
"begin": "~t\\{",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\}[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [{
"include": "source.ts"
}]
"scopeName": "source.elixir.cinder",
"injectionSelector": "L:source.elixir",
"name": "elixir-cinder",
"patterns": [
{
"comment": "Handlebars markdown fragment",
"name": "text.html.handlebars",
"begin": "\\s?(```(handlebars|hbs))$",
"beginCaptures": {
"0": {
"name": "comment.documentation.heredoc.elixir"
}
]
},
"end": "^\\s*?```$",
"endCaptures": {
"0": {
"name": "comment.documentation.heredoc.elixir"
}
},
"patterns": [
{
"include": "text.html.handlebars"
}
]
},
{
"comment": "Handlebars sigil with heredoc (double quotes)",
"name": "text.html.handlebars",
"begin": "\\s?(~B\"\"\")$",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "^\\s*(\"\"\"[a-z]*)",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "text.html.handlebars"
}
]
},
{
"comment": "Handlebars sigil with double quotes",
"name": "text.html.handlebars",
"begin": "~B\\\"",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\\"[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "text.html.handlebars"
}
]
},
{
"comment": "Handlebars sigil with square brackets",
"name": "text.html.handlebars",
"begin": "~B\\[",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\][a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "text.html.handlebars"
}
]
},
{
"comment": "Handlebars sigil with parentheses",
"name": "text.html.handlebars",
"begin": "~B\\(",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\)[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "text.html.handlebars"
}
]
},
{
"comment": "Handlebars sigil with curly braces",
"name": "text.html.handlebars",
"begin": "~B\\{",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\}[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "text.html.handlebars"
}
]
},
{
"comment": "JavaScript markdown fragment",
"name": "source.js",
"begin": "\\s?(```(js|javascript))$",
"beginCaptures": {
"0": {
"name": "comment.documentation.heredoc.elixir"
}
},
"end": "^\\s*?```$",
"endCaptures": {
"0": {
"name": "comment.documentation.heredoc.elixir"
}
},
"patterns": [
{
"include": "source.js"
}
]
},
{
"comment": "JavaScript sigil with heredoc (double quotes)",
"name": "source.js",
"begin": "\\s?(~j\"\"\")$",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "^\\s*(\"\"\"[a-z]*)",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "source.js"
}
]
},
{
"comment": "JavaScript sigil with double quotes",
"name": "source.js",
"begin": "~j\\\"",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\\"[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "source.js"
}
]
},
{
"comment": "JavaScript sigil with square brackets",
"name": "source.js",
"begin": "~j\\[",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\][a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "source.js"
}
]
},
{
"comment": "JavaScript sigil with parentheses",
"name": "source.js",
"begin": "~j\\(",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\)[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "source.js"
}
]
},
{
"comment": "JavaScript sigil with curly brackets",
"name": "source.js",
"begin": "~j\\{",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\}[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "source.js"
}
]
},
{
"comment": "TypeScript markdown fragment",
"name": "text.html.handlebars",
"begin": "\\s?(```(ts|typescript))$",
"beginCaptures": {
"0": {
"name": "comment.documentation.heredoc.elixir"
}
},
"end": "^\\s*?```$",
"endCaptures": {
"0": {
"name": "comment.documentation.heredoc.elixir"
}
},
"patterns": [
{
"include": "source.ts"
}
]
},
{
"comment": "TypeScript sigil with heredoc (double quotes)",
"name": "source.ts",
"begin": "\\s?(~t\"\"\")",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "^\\s*(\"\"\"[a-z]*)$",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "source.ts"
}
]
},
{
"comment": "TypeScript sigil with double quotes",
"name": "source.ts",
"begin": "~t\\\"",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\\"[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "source.ts"
}
]
},
{
"comment": "TypeScript sigil with square brackets",
"name": "source.ts",
"begin": "~t\\[",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\][a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "source.ts"
}
]
},
{
"comment": "TypeScript sigil with parentheses",
"name": "source.ts",
"begin": "~t\\(",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\)[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "source.ts"
}
]
},
{
"comment": "TypeScript sigil with curly brackets",
"name": "source.ts",
"begin": "~t\\{",
"beginCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"end": "\\}[a-z]*",
"endCaptures": {
"0": {
"name": "string.quoted.double.heredoc.elixir"
}
},
"patterns": [
{
"include": "source.ts"
}
]
}
]
}

View file

@ -1,33 +1,35 @@
{
"name": "cinder",
"displayName": "Cinder: A framework for web applications in Elixir",
"description": "Syntax highlighting support for Cinder/Elixir",
"version": "0.1.0",
"author": "James Harton",
"publisher": "jimsy",
"license": "HL3-FULL",
"repository": {
"type": "git",
"url": "https://gitlab.com/jimsy/vscode-cinder.git"
},
"engines": {
"vscode": "^1.25.1"
},
"categories": [
"Programming Languages"
],
"contributes": {
"grammars": [{
"path": "elixir-cinder.json",
"scopeName": "source.elixir.cinder",
"injectTo": [
"source.elixir"
],
"embeddedLanguages": {
"meta.embedded.inline.handlebars": "handlebars",
"meta.embedded.inline.js": "js",
"meta.embedded.inline.ts": "ts"
}
}]
}
"name": "cinder",
"displayName": "Cinder: A framework for web applications in Elixir",
"description": "Syntax highlighting support for Cinder/Elixir",
"version": "0.1.1",
"author": "James Harton",
"publisher": "jimsy",
"license": "HL3-FULL",
"repository": {
"type": "git",
"url": "https://gitlab.com/jimsy/vscode-cinder.git"
},
"engines": {
"vscode": "^1.25.1"
},
"categories": [
"Programming Languages"
],
"contributes": {
"grammars": [
{
"path": "elixir-cinder.json",
"scopeName": "source.elixir.cinder",
"injectTo": [
"source.elixir"
],
"embeddedLanguages": {
"meta.embedded.inline.handlebars": "handlebars",
"meta.embedded.inline.js": "js",
"meta.embedded.inline.ts": "ts"
}
}
]
}
}