diff --git a/MANIFEST.in b/MANIFEST.in index d493c5a3..7552beb9 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -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 diff --git a/vim/plugin/catsoop.vim b/syntax-highlighting/vim/plugin/catsoop.vim similarity index 100% rename from vim/plugin/catsoop.vim rename to syntax-highlighting/vim/plugin/catsoop.vim diff --git a/vim/syntax/catsoop.vim b/syntax-highlighting/vim/syntax/catsoop.vim similarity index 100% rename from vim/syntax/catsoop.vim rename to syntax-highlighting/vim/syntax/catsoop.vim diff --git a/syntax-highlighting/vscode/LICENSE b/syntax-highlighting/vscode/LICENSE new file mode 120000 index 00000000..30cff740 --- /dev/null +++ b/syntax-highlighting/vscode/LICENSE @@ -0,0 +1 @@ +../../LICENSE \ No newline at end of file diff --git a/syntax-highlighting/vscode/README b/syntax-highlighting/vscode/README new file mode 100644 index 00000000..7148f6fe --- /dev/null +++ b/syntax-highlighting/vscode/README @@ -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 diff --git a/syntax-highlighting/vscode/language-configuration.json b/syntax-highlighting/vscode/language-configuration.json new file mode 100644 index 00000000..53a16a42 --- /dev/null +++ b/syntax-highlighting/vscode/language-configuration.json @@ -0,0 +1,78 @@ +{ + "comments": { + "blockComment": [ + "", + "" + ] + }, + "brackets": [ + [ + "{", + "}" + ], + [ + "[", + "]" + ], + [ + "(", + ")" + ], + [ + "<", + ">" + ] + ], + "autoClosingPairs": [ + { + "open": "{", + "close": "}" + }, + { + "open": "[", + "close": "]" + }, + { + "open": "(", + "close": ")" + }, + { + "open": "\"", + "close": "\"" + }, + { + "open": "'", + "close": "'" + }, + { + "open": "`", + "close": "`" + } + ], + "surroundingPairs": [ + [ + "{", + "}" + ], + [ + "[", + "]" + ], + [ + "(", + ")" + ], + [ + "\"", + "\"" + ], + [ + "'", + "'" + ], + [ + "`", + "`" + ] + ] +} diff --git a/syntax-highlighting/vscode/package.json b/syntax-highlighting/vscode/package.json new file mode 100644 index 00000000..fba8a1f7 --- /dev/null +++ b/syntax-highlighting/vscode/package.json @@ -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" +} diff --git a/syntax-highlighting/vscode/syntaxes/catsoop.tmLanguage.json b/syntax-highlighting/vscode/syntaxes/catsoop.tmLanguage.json new file mode 100644 index 00000000..f52e3291 --- /dev/null +++ b/syntax-highlighting/vscode/syntaxes/catsoop.tmLanguage.json @@ -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": "", + "end": "", + "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": "()", + "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": "()", + "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" + } + ] + } + } +} diff --git a/website/__STATIC__/catsoop-syntax-0.0.1.vsix b/website/__STATIC__/catsoop-syntax-0.0.1.vsix new file mode 100644 index 00000000..e7398853 Binary files /dev/null and b/website/__STATIC__/catsoop-syntax-0.0.1.vsix differ