From 8dca274cda6f08baa74b28ec8e8fbd287b52d58a Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 30 Nov 2017 11:51:12 +0100 Subject: [PATCH] [scss] add region support --- extensions/scss/language-configuration.json | 8 +++++++- extensions/scss/package.json | 4 ++++ extensions/scss/snippets/scss.snippets.json | 16 ++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 extensions/scss/snippets/scss.snippets.json diff --git a/extensions/scss/language-configuration.json b/extensions/scss/language-configuration.json index 36a9cccd688..bdf0984ec18 100644 --- a/extensions/scss/language-configuration.json +++ b/extensions/scss/language-configuration.json @@ -21,5 +21,11 @@ ["(", ")"], ["\"", "\""], ["'", "'"] - ] + ], + "folding": { + "markers": { + "start": "^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/", + "end": "^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/" + } + } } \ No newline at end of file diff --git a/extensions/scss/package.json b/extensions/scss/package.json index 37e3abc67c5..74ae7f718fc 100644 --- a/extensions/scss/package.json +++ b/extensions/scss/package.json @@ -19,6 +19,10 @@ "scopeName": "source.css.scss", "path": "./syntaxes/scss.json" }], + "snippets": [{ + "language": "scss", + "path": "./snippets/scss.snippets.json" + }], "problemMatchers": [{ "name": "node-sass", "label": "Node Sass Compiler", diff --git a/extensions/scss/snippets/scss.snippets.json b/extensions/scss/snippets/scss.snippets.json new file mode 100644 index 00000000000..30207dbb525 --- /dev/null +++ b/extensions/scss/snippets/scss.snippets.json @@ -0,0 +1,16 @@ +{ + "Region Start": { + "prefix": "#region", + "body": [ + "/*#region $0*/" + ], + "description": "Folding Region Start" + }, + "Region End": { + "prefix": "#endregion", + "body": [ + "/*#endregion $0*/" + ], + "description": "Folding Region End" + } +}