From d9869005e2c361a1a1d35c726235b3adf4df6fe7 Mon Sep 17 00:00:00 2001 From: Dag Evensberget Date: Thu, 28 Nov 2019 15:37:37 +1000 Subject: [PATCH] Before creating a package --- language-configuration.json | 38 +++++++++++++---------------------- package.json | 8 ++++---- syntaxes/swmf.tmLanguage.json | 4 ++-- 3 files changed, 20 insertions(+), 30 deletions(-) diff --git a/language-configuration.json b/language-configuration.json index aa25710..30bbe19 100644 --- a/language-configuration.json +++ b/language-configuration.json @@ -1,30 +1,20 @@ { "comments": { // symbol used for single line comment. Remove this entry if your language does not support line comments - "lineComment": "//", - // symbols used for start and end a block comment. Remove this entry if your language does not support block comments - "blockComment": [ "/*", "*/" ] + // used here to allow quick commenting/uncommenting of lines. + "lineComment": "!", }, - // symbols used as brackets - "brackets": [ - ["{", "}"], - ["[", "]"], - ["(", ")"] - ], - // symbols that are auto closed when typing + // This works nicely. + "folding": { + "markers": { + "start": "^#BEGIN_COMP", + "end": "^#END_COMP" + } + }, + // This is mostly for show. "autoClosingPairs": [ - ["{", "}"], - ["[", "]"], - ["(", ")"], - ["\"", "\""], - ["'", "'"] + ["#BEGIN_COMP SC", "\n#END_COMP SC"], + ["#BEGIN_COMP IH", "\n#END_COMP IH"], + ["#BEGIN_COMP GM", "\n#END_COMP GM"], ], - // symbols that that can be used to surround a selection - "surroundingPairs": [ - ["{", "}"], - ["[", "]"], - ["(", ")"], - ["\"", "\""], - ["'", "'"] - ] -} \ No newline at end of file +} diff --git a/package.json b/package.json index 39f9062..f961f42 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "swmf", - "displayName": "swmf", - "description": "SWMF Configuration", + "name": "swmf-grammar", + "displayName": "swmf-grammar", + "description": "SWMF Configuration grammar for VS Code", "version": "0.0.1", "engines": { "vscode": "^1.40.0" @@ -22,4 +22,4 @@ "path": "./syntaxes/swmf.tmLanguage.json" }] } -} \ No newline at end of file +} diff --git a/syntaxes/swmf.tmLanguage.json b/syntaxes/swmf.tmLanguage.json index d40a981..16e5692 100644 --- a/syntaxes/swmf.tmLanguage.json +++ b/syntaxes/swmf.tmLanguage.json @@ -25,7 +25,7 @@ }, "command": { "patterns": [{ - "name":"cat.comment.swmf", + "name":"source.swmf", "begin": "^(#[a-zA-Z0-9_]+)(\\s.*)?\n", "end": "(?=(^\\s*\n|^#.*\n))" , @@ -94,4 +94,4 @@ } }, "scopeName": "source.swmf" -} \ No newline at end of file +}