first attempt at vscode syntax highlighting
This commit is contained in:
parent
69245d77e4
commit
67f3f99379
9 changed files with 273 additions and 1 deletions
|
|
@ -3,7 +3,7 @@ recursive-include catsoop/__HANDLERS__ *
|
|||
recursive-include catsoop/__QTYPES__ *
|
||||
recursive-include catsoop/__STATIC__ *
|
||||
recursive-include catsoop/__UTIL__ *
|
||||
recursive-include vim *
|
||||
recursive-include syntax-highlighting *
|
||||
recursive-include systemd *
|
||||
include README
|
||||
include LICENSE
|
||||
|
|
|
|||
1
syntax-highlighting/vscode/LICENSE
Symbolic link
1
syntax-highlighting/vscode/LICENSE
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../LICENSE
|
||||
9
syntax-highlighting/vscode/README
Normal file
9
syntax-highlighting/vscode/README
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
to build, use:
|
||||
npm install -g @vscode/vsce
|
||||
vsce package
|
||||
|
||||
or download from:
|
||||
https://catsoop.org/_static/catsoop-syntax-0.0.1.vsix
|
||||
|
||||
to install, run:
|
||||
code --install-extension catsoop-syntax-0.0.1.vsix
|
||||
78
syntax-highlighting/vscode/language-configuration.json
Normal file
78
syntax-highlighting/vscode/language-configuration.json
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
{
|
||||
"comments": {
|
||||
"blockComment": [
|
||||
"<comment>",
|
||||
"</comment>"
|
||||
]
|
||||
},
|
||||
"brackets": [
|
||||
[
|
||||
"{",
|
||||
"}"
|
||||
],
|
||||
[
|
||||
"[",
|
||||
"]"
|
||||
],
|
||||
[
|
||||
"(",
|
||||
")"
|
||||
],
|
||||
[
|
||||
"<",
|
||||
">"
|
||||
]
|
||||
],
|
||||
"autoClosingPairs": [
|
||||
{
|
||||
"open": "{",
|
||||
"close": "}"
|
||||
},
|
||||
{
|
||||
"open": "[",
|
||||
"close": "]"
|
||||
},
|
||||
{
|
||||
"open": "(",
|
||||
"close": ")"
|
||||
},
|
||||
{
|
||||
"open": "\"",
|
||||
"close": "\""
|
||||
},
|
||||
{
|
||||
"open": "'",
|
||||
"close": "'"
|
||||
},
|
||||
{
|
||||
"open": "`",
|
||||
"close": "`"
|
||||
}
|
||||
],
|
||||
"surroundingPairs": [
|
||||
[
|
||||
"{",
|
||||
"}"
|
||||
],
|
||||
[
|
||||
"[",
|
||||
"]"
|
||||
],
|
||||
[
|
||||
"(",
|
||||
")"
|
||||
],
|
||||
[
|
||||
"\"",
|
||||
"\""
|
||||
],
|
||||
[
|
||||
"'",
|
||||
"'"
|
||||
],
|
||||
[
|
||||
"`",
|
||||
"`"
|
||||
]
|
||||
]
|
||||
}
|
||||
31
syntax-highlighting/vscode/package.json
Normal file
31
syntax-highlighting/vscode/package.json
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"name": "catsoop-syntax",
|
||||
"displayName": "CAT-SOOP",
|
||||
"description": "Syntax highlighting for .catsoop files",
|
||||
"version": "0.0.1",
|
||||
"engines": {
|
||||
"vscode": "^1.0.0"
|
||||
},
|
||||
"categories": [
|
||||
"Programming Languages"
|
||||
],
|
||||
"contributes": {
|
||||
"languages": [
|
||||
{
|
||||
"id": "catsoop",
|
||||
"extensions": [
|
||||
".catsoop"
|
||||
],
|
||||
"configuration": "./language-configuration.json"
|
||||
}
|
||||
],
|
||||
"grammars": [
|
||||
{
|
||||
"language": "catsoop",
|
||||
"scopeName": "text.html.markdown.catsoop",
|
||||
"path": "./syntaxes/catsoop.tmLanguage.json"
|
||||
}
|
||||
]
|
||||
},
|
||||
"repository": "https://catsoop.org/git/catsoop/catsoop"
|
||||
}
|
||||
153
syntax-highlighting/vscode/syntaxes/catsoop.tmLanguage.json
Normal file
153
syntax-highlighting/vscode/syntaxes/catsoop.tmLanguage.json
Normal file
|
|
@ -0,0 +1,153 @@
|
|||
{
|
||||
"name": "CAT-SOOP",
|
||||
"scopeName": "text.html.markdown.catsoop",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#catsoop-comments"
|
||||
},
|
||||
{
|
||||
"include": "#python-blocks"
|
||||
},
|
||||
{
|
||||
"include": "#question-blocks"
|
||||
},
|
||||
{
|
||||
"include": "#python-inline"
|
||||
},
|
||||
{
|
||||
"include": "#latex-display-math"
|
||||
},
|
||||
{
|
||||
"include": "text.html.markdown"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"catsoop-comments": {
|
||||
"name": "comment.block.catsoop",
|
||||
"begin": "<comment>",
|
||||
"end": "</comment>",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "comment.block.catsoop"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "comment.block.catsoop"
|
||||
}
|
||||
}
|
||||
},
|
||||
"python-blocks": {
|
||||
"name": "meta.embedded.block.python.catsoop",
|
||||
"begin": "(<)(python)(>)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.html"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.definition.tag.end.html"
|
||||
}
|
||||
},
|
||||
"end": "(</)(python)(>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.html"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.definition.tag.end.html"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.python"
|
||||
}
|
||||
]
|
||||
},
|
||||
"question-blocks": {
|
||||
"name": "meta.embedded.block.python.question.catsoop",
|
||||
"begin": "(<)(question)\\s+([^>]*)(>)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.html"
|
||||
},
|
||||
"3": {
|
||||
"name": "string.unquoted.html.attribute.catsoop",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "text.html.basic#attribute"
|
||||
}
|
||||
]
|
||||
},
|
||||
"4": {
|
||||
"name": "punctuation.definition.tag.end.html"
|
||||
}
|
||||
},
|
||||
"end": "(</)(question)(>)",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.begin.html"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.html"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.definition.tag.end.html"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.python"
|
||||
}
|
||||
]
|
||||
},
|
||||
"python-inline": {
|
||||
"name": "meta.embedded.inline.python.catsoop",
|
||||
"begin": "@\\{",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.embedded.begin.catsoop"
|
||||
}
|
||||
},
|
||||
"end": "\\}",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.embedded.end.catsoop"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.python"
|
||||
}
|
||||
]
|
||||
},
|
||||
"latex-display-math": {
|
||||
"name": "meta.embedded.block.latex.math.catsoop",
|
||||
"begin": "\\$\\$",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.math.begin.latex"
|
||||
}
|
||||
},
|
||||
"end": "\\$\\$",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.math.end.latex"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "text.tex.latex#math"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
website/__STATIC__/catsoop-syntax-0.0.1.vsix
Normal file
BIN
website/__STATIC__/catsoop-syntax-0.0.1.vsix
Normal file
Binary file not shown.
Loading…
Reference in a new issue