diff --git a/org.eclipse.wildwebdeveloper.tests/src/org/eclipse/wildwebdeveloper/tests/TestLanguageServers.java b/org.eclipse.wildwebdeveloper.tests/src/org/eclipse/wildwebdeveloper/tests/TestLanguageServers.java
index 128160ddcc..34d781864a 100644
--- a/org.eclipse.wildwebdeveloper.tests/src/org/eclipse/wildwebdeveloper/tests/TestLanguageServers.java
+++ b/org.eclipse.wildwebdeveloper.tests/src/org/eclipse/wildwebdeveloper/tests/TestLanguageServers.java
@@ -79,6 +79,44 @@ protected boolean condition() {
}.waitForCondition(PlatformUI.getWorkbench().getDisplay(), 5000), "Diagnostic not published");
}
+ @Test
+ public void testSCSSFile() throws Exception {
+ final IFile file = project.getFile("blah.scss");
+ file.create(new ByteArrayInputStream("ERROR".getBytes()), true, null);
+ ITextEditor editor = (ITextEditor) IDE
+ .openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(), file);
+ editor.getDocumentProvider().getDocument(editor.getEditorInput()).set("FAIL");
+ assertTrue(new DisplayHelper() {
+ @Override
+ protected boolean condition() {
+ try {
+ return file.findMarkers("org.eclipse.lsp4e.diagnostic", true, IResource.DEPTH_ZERO).length != 0;
+ } catch (CoreException e) {
+ return false;
+ }
+ }
+ }.waitForCondition(PlatformUI.getWorkbench().getDisplay(), 5000), "Diagnostic not published");
+ }
+
+ @Test
+ public void testSASSFile() throws Exception {
+ final IFile file = project.getFile("blah.sass");
+ file.create(new ByteArrayInputStream("ERROR".getBytes()), true, null);
+ ITextEditor editor = (ITextEditor) IDE
+ .openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(), file);
+ editor.getDocumentProvider().getDocument(editor.getEditorInput()).set("FAIL");
+ assertTrue(new DisplayHelper() {
+ @Override
+ protected boolean condition() {
+ try {
+ return file.findMarkers("org.eclipse.lsp4e.diagnostic", true, IResource.DEPTH_ZERO).length != 0;
+ } catch (CoreException e) {
+ return false;
+ }
+ }
+ }.waitForCondition(PlatformUI.getWorkbench().getDisplay(), 5000), "Diagnostic not published");
+ }
+
@Test
public void testHTMLFile() throws Exception {
final IFile file = project.getFile("blah.html");
@@ -202,7 +240,7 @@ public void testTSXFile() throws Exception {
ITextEditor editor = (ITextEditor) IDE
.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(), file);
editor.getDocumentProvider().getDocument(editor.getEditorInput()).set("FAIL");
-
+
assertTrue(new DisplayHelper() {
@Override
protected boolean condition() {
@@ -213,15 +251,15 @@ protected boolean condition() {
}
}
}.waitForCondition(PlatformUI.getWorkbench().getDisplay(), 15000), "Diagnostic not published");
-
+
editor.getDocumentProvider().getDocument(editor.getEditorInput()).set("const x = <>>;export default x;");
assertTrue(new DisplayHelper() {
@Override
protected boolean condition() {
try {
IMarker[] markers = file.findMarkers("org.eclipse.lsp4e.diagnostic", true, IResource.DEPTH_ZERO);
- for(IMarker m: markers){
- if(((String) m.getAttribute(IMarker.MESSAGE)).contains("React")){
+ for (IMarker m : markers) {
+ if (((String) m.getAttribute(IMarker.MESSAGE)).contains("React")) {
return true;
}
}
diff --git a/org.eclipse.wildwebdeveloper/grammars/css/css.tmLanguage.json b/org.eclipse.wildwebdeveloper/grammars/css/css.tmLanguage.json
index 52c5eec130..2096e16e92 100644
--- a/org.eclipse.wildwebdeveloper/grammars/css/css.tmLanguage.json
+++ b/org.eclipse.wildwebdeveloper/grammars/css/css.tmLanguage.json
@@ -1,17 +1,12 @@
{
"information_for_contributors": [
- "This file has been converted from https://github.com/atom/language-css/blob/master/grammars/css.cson",
+ "This file has been converted from https://github.com/microsoft/vscode-css/blob/master/grammars/css.cson",
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
- "version": "https://github.com/atom/language-css/commit/02c1eb4e0d45f021694cf1825f6e2040872f3599",
- "scopeName": "source.css",
+ "version": "https://github.com/microsoft/vscode-css/commit/c216f777497265700ff336f739328e5197e012cd",
"name": "CSS",
- "fileTypes": [
- "css",
- "css.erb"
- ],
- "firstLineMatch": "(?xi)\n# Emacs modeline\n-\\*-(?:\\s*(?=[^:;\\s]+\\s*-\\*-)|(?:.*?[;\\s]|(?<=-\\*-))mode\\s*:\\s*)\n css\n(?=[\\s;]|(?]?\\d+|m)?|\\sex)(?=:(?=\\s*set?\\s[^\\n:]+:)|:(?!\\s*set?\\s))(?:(?:\\s|\\s*:\\s*)\\w*(?:\\s*=(?:[^\\n\\\\\\s]|\\\\.)*)?)*[\\s:](?:filetype|ft|syntax)\\s*=\n css\n(?=\\s|:|$)",
+ "scopeName": "source.css",
"patterns": [
{
"include": "#comment-block"
@@ -513,7 +508,7 @@
]
},
{
- "begin": "(?i)((@)viewport)(?=[\\s'\"{;]|/\\*|$)",
+ "begin": "(?i)((@)(-(ms|o)-)?viewport)(?=[\\s'\"{;]|/\\*|$)",
"beginCaptures": {
"1": {
"name": "keyword.control.at-rule.viewport.css"
@@ -609,6 +604,69 @@
"include": "#string"
}
]
+ },
+ {
+ "begin": "(?i)(?=@[\\w-]+[^;]+;s*$)",
+ "end": "(?<=;)(?!\\G)",
+ "patterns": [
+ {
+ "begin": "(?i)\\G(@)[\\w-]+",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.control.at-rule.css"
+ },
+ "1": {
+ "name": "punctuation.definition.keyword.css"
+ }
+ },
+ "end": ";",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.terminator.rule.css"
+ }
+ },
+ "name": "meta.at-rule.header.css"
+ }
+ ]
+ },
+ {
+ "begin": "(?i)(?=@[\\w-]+(\\s|\\(|{|/\\*|$))",
+ "end": "(?<=})(?!\\G)",
+ "patterns": [
+ {
+ "begin": "(?i)\\G(@)[\\w-]+",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.control.at-rule.css"
+ },
+ "1": {
+ "name": "punctuation.definition.keyword.css"
+ }
+ },
+ "end": "(?=\\s*[{;])",
+ "name": "meta.at-rule.header.css"
+ },
+ {
+ "begin": "{",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.section.begin.bracket.curly.css"
+ }
+ },
+ "end": "}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.section.end.bracket.curly.css"
+ }
+ },
+ "name": "meta.at-rule.body.css",
+ "patterns": [
+ {
+ "include": "$self"
+ }
+ ]
+ }
+ ]
}
]
},
@@ -670,7 +728,8 @@
"name": "constant.character.escape.codepoint.css"
},
{
- "match": "\\\\$\\n?",
+ "begin": "\\\\$\\s*",
+ "end": "^(?<:=]|\\)|/\\*) # Terminates cleanly"
+ "match": "(?xi)\n(?<=^|\\s|\\(|\\*/) # Preceded by whitespace, bracket or comment\n(?:\n # Standardised features\n (\n (?:min-|max-)? # Range features\n (?: height\n | width\n | aspect-ratio\n | color\n | color-index\n | monochrome\n | resolution\n )\n | grid # Discrete features\n | scan\n | orientation\n | display-mode\n | hover\n )\n |\n # Deprecated features\n (\n (?:min-|max-)? # Deprecated in Media Queries 4\n device-\n (?: height\n | width\n | aspect-ratio\n )\n )\n |\n # Vendor extensions\n (\n (?:\n # Spec-compliant syntax\n [-_]\n (?: webkit # Webkit/Blink\n | apple|khtml # Webkit aliases\n | epub # ePub3\n | moz # Gecko\n | ms # Microsoft\n | o # Presto (pre-Opera 15)\n | xv|ah|rim|atsc| # Less common vendors\n hp|tc|wap|ro\n )\n |\n # Non-standard prefixes\n (?: mso # Microsoft Office\n | prince # YesLogic\n )\n )\n -\n [\\w-]+ # Feature name\n (?= # Terminates correctly\n \\s* # Possible whitespace\n (?: # Possible injected comment\n /\\*\n (?:[^*]|\\*[^/])*\n \\*/\n )?\n \\s*\n [:)] # Ends with a colon or closed bracket\n )\n )\n)\n(?=\\s|$|[><:=]|\\)|/\\*) # Terminates cleanly"
},
"media-feature-keywords": {
- "match": "(?xi)\n(?<=^|\\s|:|\\*/)\n(?: portrait # Orientation\n | landscape\n | progressive # Scan types\n | interlace\n | fullscreen # Display modes\n | standalone\n | minimal-ui\n | browser\n)\n(?=\\s|\\)|$)",
+ "match": "(?xi)\n(?<=^|\\s|:|\\*/)\n(?: portrait # Orientation\n | landscape\n | progressive # Scan types\n | interlace\n | fullscreen # Display modes\n | standalone\n | minimal-ui\n | browser\n | hover\n)\n(?=\\s|\\)|$)",
"name": "support.constant.property-value.css"
},
"media-query": {
@@ -1334,7 +1393,7 @@
"name": "keyword.other.unit.${2:/downcase}.css"
}
},
- "match": "(?xi) (?*/]\n (?:[^@<>*/]|\\*[^/])*\n)\n(?:\n \\s*\n (<)\n ([^>\\s]+)\n (>)\n)?",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.sassdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.sassdoc"
+ },
+ "3": {
+ "name": "entity.name.type.instance.sassdoc"
+ },
+ "4": {
+ "name": "punctuation.definition.bracket.angle.begin.sassdoc"
+ },
+ "5": {
+ "name": "constant.other.email.link.underline.sassdoc"
+ },
+ "6": {
+ "name": "punctuation.definition.bracket.angle.end.sassdoc"
+ }
+ }
+ },
+ {
+ "name": "meta.example.css.scss.sassdoc",
+ "begin": "(?x)\n((@)example)\n\\s+\n(css|scss)",
+ "end": "(?=@|///$)",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.type.class.sassdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.sassdoc"
+ },
+ "3": {
+ "name": "variable.other.sassdoc"
+ }
+ },
+ "patterns": [
+ {
+ "match": "^///\\s+"
+ },
+ {
+ "match": "[^\\s@*](?:[^*]|\\*[^/])*",
+ "captures": {
+ "0": {
+ "name": "source.embedded.css.scss",
+ "patterns": [
+ {
+ "include": "source.css.scss"
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ {
+ "name": "meta.example.html.sassdoc",
+ "begin": "(?x)\n((@)example)\n\\s+\n(markup)",
+ "end": "(?=@|///$)",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.type.class.sassdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.sassdoc"
+ },
+ "3": {
+ "name": "variable.other.sassdoc"
+ }
+ },
+ "patterns": [
+ {
+ "match": "^///\\s+"
+ },
+ {
+ "match": "[^\\s@*](?:[^*]|\\*[^/])*",
+ "captures": {
+ "0": {
+ "name": "source.embedded.html",
+ "patterns": [
+ {
+ "include": "source.html"
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ {
+ "name": "meta.example.js.sassdoc",
+ "begin": "(?x)\n((@)example)\n\\s+\n(javascript)",
+ "end": "(?=@|///$)",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.type.class.sassdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.sassdoc"
+ },
+ "3": {
+ "name": "variable.other.sassdoc"
+ }
+ },
+ "patterns": [
+ {
+ "match": "^///\\s+"
+ },
+ {
+ "match": "[^\\s@*](?:[^*]|\\*[^/])*",
+ "captures": {
+ "0": {
+ "name": "source.embedded.js",
+ "patterns": [
+ {
+ "include": "source.js"
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ {
+ "match": "(?x)\n((@)link)\n\\s+\n(?:\n # URL\n (\n (?=https?://)\n (?:[^\\s*]|\\*[^/])+\n )\n)",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.sassdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.sassdoc"
+ },
+ "3": {
+ "name": "variable.other.link.underline.sassdoc"
+ },
+ "4": {
+ "name": "entity.name.type.instance.sassdoc"
+ }
+ }
+ },
+ {
+ "match": "(?x)\n(\n (@)\n (?:arg|argument|param|parameter|requires?|see|colors?|fonts?|ratios?|sizes?)\n)\n\\s+\n(\n [A-Za-z_$%]\n [\\-\\w$.\\[\\]]*\n)",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.sassdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.sassdoc"
+ },
+ "3": {
+ "name": "variable.other.sassdoc"
+ }
+ }
+ },
+ {
+ "begin": "((@)(?:arg|argument|param|parameter|prop|property|requires?|see|sizes?))\\s+(?={)",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.type.class.sassdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.sassdoc"
+ }
+ },
+ "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
+ "patterns": [
+ {
+ "include": "#sassdoctype"
+ },
+ {
+ "match": "([A-Za-z_$%][\\-\\w$.\\[\\]]*)",
+ "name": "variable.other.sassdoc"
+ },
+ {
+ "name": "variable.other.sassdoc",
+ "match": "(?x)\n(\\[)\\s*\n[\\w$]+\n(?:\n (?:\\[\\])? # Foo[].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [\\w$]+\n)*\n(?:\n \\s*\n (=) # [foo=bar] Default parameter value\n \\s*\n (\n # The inner regexes are to stop the match early at */ and to not stop at escaped quotes\n (?>\n \"(?:(?:\\*(?!/))|(?:\\\\(?!\"))|[^*\\\\])*?\" | # [foo=\"bar\"] Double-quoted\n '(?:(?:\\*(?!/))|(?:\\\\(?!'))|[^*\\\\])*?' | # [foo='bar'] Single-quoted\n \\[ (?:(?:\\*(?!/))|[^*])*? \\] | # [foo=[1,2]] Array literal\n (?:(?:\\*(?!/))|\\s(?!\\s*\\])|\\[.*?(?:\\]|(?=\\*/))|[^*\\s\\[\\]])* # Everything else (sorry)\n )*\n )\n)?\n\\s*(?:(\\])((?:[^*\\s]|\\*[^\\s/])+)?|(?=\\*/))",
+ "captures": {
+ "1": {
+ "name": "punctuation.definition.optional-value.begin.bracket.square.sassdoc"
+ },
+ "2": {
+ "name": "keyword.operator.assignment.sassdoc"
+ },
+ "3": {
+ "name": "source.embedded.js",
+ "patterns": [
+ {
+ "include": "source.js"
+ }
+ ]
+ },
+ "4": {
+ "name": "punctuation.definition.optional-value.end.bracket.square.sassdoc"
+ },
+ "5": {
+ "name": "invalid.illegal.syntax.sassdoc"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "begin": "(?x)\n(\n (@)\n (?:returns?|throws?|exception|outputs?)\n)\n\\s+(?={)",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.type.class.sassdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.sassdoc"
+ }
+ },
+ "end": "(?=\\s|[^{}\\[\\]A-Za-z_$])",
+ "patterns": [
+ {
+ "include": "#sassdoctype"
+ }
+ ]
+ },
+ {
+ "match": "(?x)\n(\n (@)\n (?:type)\n)\n\\s+\n(\n (?:\n [A-Za-z |]+\n )\n)",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.sassdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.sassdoc"
+ },
+ "3": {
+ "name": "entity.name.type.instance.sassdoc",
+ "patterns": [
+ {
+ "include": "#sassdoctypedelimiter"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "match": "(?x)\n(\n (@)\n (?:alias|group|name|requires?|see|icons?)\n)\n\\s+\n(\n (?:\n [^{}@\\s*] | \\*[^/]\n )+\n)",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.sassdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.sassdoc"
+ },
+ "3": {
+ "name": "entity.name.type.instance.sassdoc"
+ }
+ }
+ },
+ {
+ "name": "storage.type.class.sassdoc",
+ "match": "(?x)\n(@)\n(?:access|alias|author|content|deprecated|example|exception|group\n|ignore|name|prop|property|requires?|returns?|see|since|throws?|todo\n|type|outputs?)\n\\b",
+ "captures": {
+ "1": {
+ "name": "punctuation.definition.block.tag.sassdoc"
+ }
+ }
+ }
+ ],
+ "repository": {
+ "brackets": {
+ "patterns": [
+ {
+ "begin": "{",
+ "end": "}|(?=$)",
+ "patterns": [
+ {
+ "include": "#brackets"
+ }
+ ]
+ },
+ {
+ "begin": "\\[",
+ "end": "\\]|(?=$)",
+ "patterns": [
+ {
+ "include": "#brackets"
+ }
+ ]
+ }
+ ]
+ },
+ "sassdoctypedelimiter": {
+ "match": "(\\|)",
+ "captures": {
+ "1": {
+ "name": "punctuation.definition.delimiter.sassdoc"
+ }
+ }
+ },
+ "sassdoctype": {
+ "patterns": [
+ {
+ "name": "invalid.illegal.type.sassdoc",
+ "match": "\\G{(?:[^}*]|\\*[^/}])+$"
+ },
+ {
+ "begin": "\\G({)",
+ "beginCaptures": {
+ "0": {
+ "name": "entity.name.type.instance.sassdoc"
+ },
+ "1": {
+ "name": "punctuation.definition.bracket.curly.begin.sassdoc"
+ }
+ },
+ "contentName": "entity.name.type.instance.sassdoc",
+ "end": "((}))\\s*|(?=$)",
+ "endCaptures": {
+ "1": {
+ "name": "entity.name.type.instance.sassdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.bracket.curly.end.sassdoc"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#brackets"
+ }
+ ]
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.wildwebdeveloper/grammars/scss/scss.json b/org.eclipse.wildwebdeveloper/grammars/scss/scss.tmLanguage.json
similarity index 84%
rename from org.eclipse.wildwebdeveloper/grammars/scss/scss.json
rename to org.eclipse.wildwebdeveloper/grammars/scss/scss.tmLanguage.json
index d60a4be60e..21ed870a5c 100644
--- a/org.eclipse.wildwebdeveloper/grammars/scss/scss.json
+++ b/org.eclipse.wildwebdeveloper/grammars/scss/scss.tmLanguage.json
@@ -4,19 +4,19 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
- "scopeName": "source.css.scss",
+ "version": "https://github.com/atom/language-sass/commit/f52ab12f7f9346cc2568129d8c4419bd3d506b47",
"name": "SCSS",
- "fileTypes": [
- "scss",
- "css.scss",
- "css.scss.erb",
- "scss.erb",
- "scss.liquid"
- ],
+ "scopeName": "source.css.scss",
"patterns": [
{
"include": "#variable_setting"
},
+ {
+ "include": "#at_rule_forward"
+ },
+ {
+ "include": "#at_rule_use"
+ },
{
"include": "#at_rule_include"
},
@@ -67,6 +67,10 @@
},
{
"include": "#at_rule_supports"
+ },
+ {
+ "match": ";",
+ "name": "punctuation.terminator.rule.css"
}
],
"repository": {
@@ -171,14 +175,14 @@
"begin": "\\s*((@)extend\\b)\\s*",
"captures": {
"1": {
- "name": "keyword.control.at-rule.import.scss"
+ "name": "keyword.control.at-rule.extend.scss"
},
"2": {
"name": "punctuation.definition.keyword.scss"
}
},
"end": "\\s*(?=;)",
- "name": "meta.at-rule.import.scss",
+ "name": "meta.at-rule.extend.scss",
"patterns": [
{
"include": "#variable"
@@ -241,6 +245,55 @@
}
]
},
+ "at_rule_forward": {
+ "begin": "\\s*((@)forward\\b)\\s*",
+ "captures": {
+ "1": {
+ "name": "keyword.control.at-rule.forward.scss"
+ },
+ "2": {
+ "name": "punctuation.definition.keyword.scss"
+ }
+ },
+ "end": "\\s*(?=;)",
+ "name": "meta.at-rule.forward.scss",
+ "patterns": [
+ {
+ "match": "\\b(as|hide|show)\\b",
+ "name": "keyword.control.operator"
+ },
+ {
+ "match": "\\b([\\w-]+)(\\*)",
+ "captures": {
+ "1": {
+ "name": "entity.other.attribute-name.module.scss"
+ },
+ "2": {
+ "name": "punctuation.definition.wildcard.scss"
+ }
+ }
+ },
+ {
+ "match": "\\b[\\w-]+\\b",
+ "name": "entity.name.function.scss"
+ },
+ {
+ "include": "#variable"
+ },
+ {
+ "include": "#string_single"
+ },
+ {
+ "include": "#string_double"
+ },
+ {
+ "include": "#comment_line"
+ },
+ {
+ "include": "#comment_block"
+ }
+ ]
+ },
"at_rule_function": {
"patterns": [
{
@@ -338,12 +391,18 @@
"at_rule_include": {
"patterns": [
{
- "begin": "(?<=@include)\\s+([\\w-]+)\\s*(\\()",
+ "begin": "(?<=@include)\\s+(?:([\\w-]+)\\s*(\\.))?([\\w-]+)\\s*(\\()",
"beginCaptures": {
"1": {
- "name": "entity.name.function.scss"
+ "name": "variable.scss"
},
"2": {
+ "name": "punctuation.access.module.scss"
+ },
+ "3": {
+ "name": "entity.name.function.scss"
+ },
+ "4": {
"name": "punctuation.definition.parameters.begin.bracket.round.scss"
}
},
@@ -361,12 +420,18 @@
]
},
{
- "match": "(?<=@include)\\s+([\\w-]+)",
+ "match": "(?<=@include)\\s+(?:([\\w-]+)\\s*(\\.))?([\\w-]+)",
"captures": {
"0": {
"name": "meta.at-rule.include.scss"
},
"1": {
+ "name": "variable.scss"
+ },
+ "2": {
+ "name": "punctuation.access.module.scss"
+ },
+ "3": {
"name": "entity.name.function.scss"
}
}
@@ -495,9 +560,8 @@
"at_rule_media": {
"patterns": [
{
- "begin": "^\\s*((@)media\\b)\\s*",
- "end": "\\s*(?={)",
- "captures": {
+ "begin": "^\\s*((@)media)\\b",
+ "beginCaptures": {
"1": {
"name": "keyword.control.at-rule.media.scss"
},
@@ -505,8 +569,12 @@
"name": "punctuation.definition.keyword.scss"
}
},
+ "end": "\\s*(?={)",
"name": "meta.at-rule.media.scss",
"patterns": [
+ {
+ "include": "#comment_docblock"
+ },
{
"include": "#comment_block"
},
@@ -515,7 +583,7 @@
},
{
"match": "\\b(only)\\b",
- "name": "keyword.control.operator"
+ "name": "keyword.control.operator.css.scss"
},
{
"begin": "\\(",
@@ -793,6 +861,64 @@
}
]
},
+ "at_rule_use": {
+ "begin": "\\s*((@)use\\b)\\s*",
+ "captures": {
+ "1": {
+ "name": "keyword.control.at-rule.use.scss"
+ },
+ "2": {
+ "name": "punctuation.definition.keyword.scss"
+ }
+ },
+ "end": "\\s*(?=;)",
+ "name": "meta.at-rule.use.scss",
+ "patterns": [
+ {
+ "match": "\\b(as|with)\\b",
+ "name": "keyword.control.operator"
+ },
+ {
+ "match": "\\b[\\w-]+\\b",
+ "name": "variable.scss"
+ },
+ {
+ "match": "\\*",
+ "name": "variable.language.expanded-namespace.scss"
+ },
+ {
+ "include": "#string_single"
+ },
+ {
+ "include": "#string_double"
+ },
+ {
+ "include": "#comment_line"
+ },
+ {
+ "include": "#comment_block"
+ },
+ {
+ "begin": "\\(",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.parameters.begin.bracket.round.scss"
+ }
+ },
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.parameters.end.bracket.round.scss"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#function_attributes"
+ }
+ ]
+ }
+ ]
+ },
"at_rule_warn": {
"begin": "\\s*((@)(warn|debug|error)\\b)\\s*",
"captures": {
@@ -844,6 +970,21 @@
}
]
},
+ "comment_docblock": {
+ "name": "comment.block.documentation.scss",
+ "begin": "///",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.comment.scss"
+ }
+ },
+ "end": "(?=$)",
+ "patterns": [
+ {
+ "include": "source.sassdoc"
+ }
+ ]
+ },
"comment_block": {
"begin": "/\\*",
"beginCaptures": {
@@ -874,12 +1015,18 @@
"name": "keyword.other.default.scss"
},
"constant_functions": {
- "begin": "([\\w-]+)(\\()",
+ "begin": "(?:([\\w-]+)(\\.))?([\\w-]+)(\\()",
"beginCaptures": {
"1": {
- "name": "support.function.misc.scss"
+ "name": "variable.scss"
},
"2": {
+ "name": "punctuation.access.module.scss"
+ },
+ "3": {
+ "name": "support.function.misc.scss"
+ },
+ "4": {
"name": "punctuation.section.function.scss"
}
},
@@ -1007,6 +1154,9 @@
{
"include": "#variable"
},
+ {
+ "include": "#comment_docblock"
+ },
{
"include": "#comment_block"
},
@@ -1031,10 +1181,10 @@
"name": "variable.interpolation.scss",
"patterns": [
{
- "include": "#property_values"
+ "include": "#variable"
},
{
- "include": "#variable"
+ "include": "#property_values"
}
]
},
@@ -1053,7 +1203,7 @@
"name": "keyword.operator.comparison.scss"
},
"logical_operators": {
- "match": "\\b(not\\b|or\\b|and\\b)",
+ "match": "\\b(not|or|and)\\b",
"name": "keyword.operator.logical.scss"
},
"map": {
@@ -1069,8 +1219,11 @@
"name": "punctuation.definition.map.end.bracket.round.scss"
}
},
- "name": "meta.set.variable.map.scss",
+ "name": "meta.definition.variable.map.scss",
"patterns": [
+ {
+ "include": "#comment_docblock"
+ },
{
"include": "#comment_block"
},
@@ -1096,10 +1249,10 @@
"include": "#map"
},
{
- "include": "#property_values"
+ "include": "#variable"
},
{
- "include": "#variable"
+ "include": "#property_values"
}
]
},
@@ -1304,7 +1457,7 @@
]
},
"selector_attribute": {
- "match": "(?xi)\n(\\[)\n\\s*\n(\n (?:\n [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n)\n(?:\n \\s*([~|^$*]?=)\\s*\n (?:\n (\n (?:\n [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n )\n |\n ((\")(.*)(\"))\n |\n ((')(.*)('))\n )\n)?\n\\s*\n(\\])",
+ "match": "(?xi)\n(\\[)\n\\s*\n(\n (?:\n [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+?\n)\n(?:\n \\s*([~|^$*]?=)\\s*\n (?:\n (\n (?:\n [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n )\n |\n ((\")(.*?)(\"))\n |\n ((')(.*?)('))\n )\n)?\n\\s*\n(\\])",
"name": "meta.attribute-selector.scss",
"captures": {
"1": {
@@ -1399,7 +1552,7 @@
}
},
"selector_class": {
- "match": "(?x)\n(\\.) # Valid class-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,.\\#)\\[:{>+~|] # - Another selector\n | /\\* # - A block comment\n)",
+ "match": "(?x)\n(\\.) # Valid class-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,\\#)\\[:{>+~|] # - Another selector\n | \\.[^$] # - Class selector, negating module variable\n | /\\* # - A block comment\n | ; # - A semicolon\n)",
"name": "entity.other.attribute-name.class.css",
"captures": {
"1": {
@@ -1427,7 +1580,7 @@
"name": "entity.name.tag.custom.scss"
},
"selector_id": {
- "match": "(?x)\n(\\#) # Valid id-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,.\\#)\\[:{>+~|] # - Another selector\n | /\\* # - A block comment\n)",
+ "match": "(?x)\n(\\#) # Valid id-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,\\#)\\[:{>+~|] # - Another selector\n | \\.[^$] # - Class selector, negating module variable\n | /\\* # - A block comment\n)",
"name": "entity.other.attribute-name.id.css",
"captures": {
"1": {
@@ -1451,7 +1604,7 @@
}
},
"selector_placeholder": {
- "match": "(?x)\n(%) # Valid placeholder-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,.\\#)\\[:{>+~|] # - Another selector\n | /\\* # - A block comment\n)",
+ "match": "(?x)\n(%) # Valid placeholder-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.\\$ # Possible start of interpolation module scope variable\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= ; # - End of statement\n | $ # - End of the line\n | [\\s,\\#)\\[:{>+~|] # - Another selector\n | \\.[^$] # - Class selector, negating module variable\n | /\\* # - A block comment\n)",
"name": "entity.other.attribute-name.placeholder.css",
"captures": {
"1": {
@@ -1539,6 +1692,12 @@
},
{
"include": "source.css#pseudo-classes"
+ },
+ {
+ "include": "source.css#pseudo-elements"
+ },
+ {
+ "include": "source.css#functional-pseudo-classes"
}
]
},
@@ -1646,38 +1805,75 @@
]
},
"variable_setting": {
- "begin": "\\s*(\\$[A-Za-z0-9_-]+\\b)\\s*(:)\\s*",
- "captures": {
- "1": {
- "name": "variable.scss"
- },
- "2": {
- "name": "punctuation.separator.key-value.scss"
+ "begin": "(?=\\$[\\w-]+\\s*:)",
+ "end": ";",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.terminator.rule.scss"
}
},
- "end": "\\s*(?=;)",
- "name": "meta.set.variable.scss",
+ "contentName": "meta.definition.variable.scss",
"patterns": [
{
- "include": "#comment_block"
- },
- {
- "include": "#comment_line"
+ "match": "\\$[\\w-]+(?=\\s*:)",
+ "name": "variable.scss"
},
{
- "include": "#map"
- },
+ "begin": ":",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.separator.key-value.scss"
+ }
+ },
+ "end": "(?=;)",
+ "patterns": [
+ {
+ "include": "#comment_docblock"
+ },
+ {
+ "include": "#comment_block"
+ },
+ {
+ "include": "#comment_line"
+ },
+ {
+ "include": "#map"
+ },
+ {
+ "include": "#property_values"
+ },
+ {
+ "include": "#variable"
+ },
+ {
+ "match": ",",
+ "name": "punctuation.separator.delimiter.scss"
+ }
+ ]
+ }
+ ]
+ },
+ "variables": {
+ "patterns": [
{
- "include": "#property_values"
+ "match": "\\b([\\w-]+)(\\.)(\\$[\\w-]+)\\b",
+ "captures": {
+ "1": {
+ "name": "variable.scss"
+ },
+ "2": {
+ "name": "punctuation.access.module.scss"
+ },
+ "3": {
+ "name": "variable.scss"
+ }
+ }
},
{
- "include": "#variable"
+ "match": "(\\$|\\-\\-)[A-Za-z0-9_-]+\\b",
+ "name": "variable.scss"
}
]
- },
- "variables": {
- "match": "(\\$|\\-\\-)[A-Za-z0-9_-]+\\b",
- "name": "variable.scss"
}
}
}
\ No newline at end of file
diff --git a/org.eclipse.wildwebdeveloper/language-configurations/css/language-configuration.json b/org.eclipse.wildwebdeveloper/language-configurations/css/language-configuration.json
index b48a3a067d..83dbabd876 100644
--- a/org.eclipse.wildwebdeveloper/language-configurations/css/language-configuration.json
+++ b/org.eclipse.wildwebdeveloper/language-configurations/css/language-configuration.json
@@ -1,19 +1,3 @@
-/**
- * Copyright (c) 2015-2017 Angelo ZERR.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial code from https://github.com/Microsoft/vscode/
- * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved.
- * Initial license: MIT
- *
- * Contributors:
- * - Microsoft Corporation: Initial code licensed under MIT license
- *
- * @see https://github.com/Microsoft/vscode/blob/master/extensions/css/language-configuration.json
- */
{
"comments": {
"blockComment": ["/*", "*/"]
@@ -36,5 +20,16 @@
["(", ")"],
["\"", "\""],
["'", "'"]
- ]
-}
\ No newline at end of file
+ ],
+ "folding": {
+ "markers": {
+ "start": "^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/",
+ "end": "^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/"
+ }
+ },
+ "indentationRules": {
+ "increaseIndentPattern": "(^.*\\{[^}]*$)",
+ "decreaseIndentPattern": "^\\s*\\}"
+ },
+ "wordPattern": "(#?-?\\d*\\.\\d\\w*%?)|(::?[\\w-]*(?=[^,{;]*[,{]))|(([@#.!])?[\\w-?]+%?|[@#!.])"
+}
diff --git a/org.eclipse.wildwebdeveloper/language-configurations/less/language-configuration.json b/org.eclipse.wildwebdeveloper/language-configurations/less/language-configuration.json
index c8d05c3596..7325d05270 100644
--- a/org.eclipse.wildwebdeveloper/language-configurations/less/language-configuration.json
+++ b/org.eclipse.wildwebdeveloper/language-configurations/less/language-configuration.json
@@ -1,20 +1,4 @@
-/**
- * Copyright (c) 2015-2017 Gautier de Saint Martin Lacaze.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial code from https://github.com/Microsoft/vscode/
- * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved.
- * Initial license: MIT
- *
- * Contributors:
- * - Microsoft Corporation: Initial code licensed under MIT license
- *
- * @see https://github.com/Microsoft/vscode/blob/master/extensions/less/language-configuration.json
- */
- {
+{
"comments": {
"blockComment": ["/*", "*/"],
"lineComment": "//"
@@ -37,5 +21,16 @@
["(", ")"],
["\"", "\""],
["'", "'"]
- ]
-}
\ No newline at end of file
+ ],
+ "folding": {
+ "markers": {
+ "start": "^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/",
+ "end": "^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/"
+ }
+ },
+ "indentationRules": {
+ "increaseIndentPattern": "(^.*\\{[^}]*$)",
+ "decreaseIndentPattern": "^\\s*\\}"
+ },
+ "wordPattern": "(#?-?\\d*\\.\\d\\w*%?)|(::?[\\w-]+(?=[^,{;]*[,{]))|(([@#.!])?[\\w-?]+%?|[@#!.])"
+}
diff --git a/org.eclipse.wildwebdeveloper/language-configurations/scss/language-configuration.json b/org.eclipse.wildwebdeveloper/language-configurations/scss/language-configuration.json
index fdadca07f5..ffa53ddf95 100644
--- a/org.eclipse.wildwebdeveloper/language-configurations/scss/language-configuration.json
+++ b/org.eclipse.wildwebdeveloper/language-configurations/scss/language-configuration.json
@@ -1,20 +1,4 @@
-/**
- * Copyright (c) 2015-2017 Gautier de Saint Martin Lacaze.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial code from https://github.com/Microsoft/vscode/
- * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved.
- * Initial license: MIT
- *
- * Contributors:
- * - Microsoft Corporation: Initial code licensed under MIT license
- *
- * @see https://github.com/Microsoft/vscode/blob/master/extensions/scss/language-configuration.json
- */
- {
+{
"comments": {
"blockComment": ["/*", "*/"],
"lineComment": "//"
@@ -37,5 +21,25 @@
["(", ")"],
["\"", "\""],
["'", "'"]
+ ],
+ "folding": {
+ "markers": {
+ "start": "^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/",
+ "end": "^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/"
+ }
+ },
+ "indentationRules": {
+ "increaseIndentPattern": "(^.*\\{[^}]*$)",
+ "decreaseIndentPattern": "^\\s*\\}"
+ },
+ "wordPattern": "(#?-?\\d*\\.\\d\\w*%?)|(::?[\\w-]*(?=[^,{;]*[,{]))|(([@$#.!])?[\\w-?]+%?|[@#!$.])",
+ "onEnterRules": [
+ {
+ "beforeText": "^[\\s]*///.*$",
+ "action": {
+ "indent": "none",
+ "appendText": "/// "
+ }
+ }
]
-}
\ No newline at end of file
+}
diff --git a/org.eclipse.wildwebdeveloper/plugin.xml b/org.eclipse.wildwebdeveloper/plugin.xml
index 810ef401ce..312bebc688 100644
--- a/org.eclipse.wildwebdeveloper/plugin.xml
+++ b/org.eclipse.wildwebdeveloper/plugin.xml
@@ -173,11 +173,18 @@
+
+
+
+
+
+