From 13f05a737a3b3c48d8a8183779a7226c1a09ad21 Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 31 Aug 2024 01:05:40 +0000 Subject: [PATCH] feat: update Themes and Grammars [ci skip] --- packages/tm-grammars/README.md | 10 +- packages/tm-grammars/grammars/dart.json | 2 +- packages/tm-grammars/grammars/fsharp.json | 4 +- packages/tm-grammars/grammars/go.json | 27 +- packages/tm-grammars/grammars/less.json | 607 ++++++++++++++++------ packages/tm-grammars/grammars/rust.json | 9 +- packages/tm-grammars/index.js | 40 +- packages/tm-grammars/package.json | 2 +- 8 files changed, 491 insertions(+), 210 deletions(-) diff --git a/packages/tm-grammars/README.md b/packages/tm-grammars/README.md index c5a1b88..b4ec78d 100644 --- a/packages/tm-grammars/README.md +++ b/packages/tm-grammars/README.md @@ -60,7 +60,7 @@ import { grammars } from 'tm-grammars' | `cue` | | [cue-sh/vscode-cue](https://github.com/cue-sh/vscode-cue/blob/0734615a2607fe03f5d6c1816f8f7435179659fc/syntaxes/cue.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/cue-sh/vscode-cue/master/LICENSE) | | 15.89 kB | | `cypher` | `cql` | [adam-cowley/neo4j-vscode](https://github.com/adam-cowley/neo4j-vscode/blob/ad90d275ac76c740018e78f78722343f730270e0/cypher/cypher.tmLanguage) | [MIT](https://raw.githubusercontent.com/adam-cowley/neo4j-vscode/main/LICENSE) | | 6.35 kB | | `d` | | [Pure-D/code-d](https://github.com/Pure-D/code-d/blob/466ac04dcc1f6d3fea50ef5ae7a920a121efd09c/syntaxes/d.json) | [MIT](https://raw.githubusercontent.com/Pure-D/code-d/master/LICENSE.md) | | 40.23 kB | -| `dart` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/5c213a1e84928c7a7d11ca5b282ca602d40c1352/extensions/dart/syntaxes/dart.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | 6.92 kB | +| `dart` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/03dc55030b3b2b5c4779d4ac1e2e46cd1f5a6b7c/extensions/dart/syntaxes/dart.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | 6.96 kB | | `dax` | | [huyza/dax-language](https://github.com/huyza/dax-language/blob/7fd39aa84552617daa258189b2550dcdbd14149a/syntaxes/dax.grammer.json) | | | 5.27 kB | | `desktop` | | [nico-castell/desktop-file-support](https://github.com/nico-castell/desktop-file-support/blob/63720f5f05313de22b68ecbd0ca3d3ed8ba57e7e/syntaxes/desktop.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/nico-castell/desktop-file-support/main/LICENSE) | | 1.81 kB | | `diff` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/4549bd26c7b799284e0ebd8dc1e0310e6a8707a1/extensions/diff/syntaxes/diff.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | 2.45 kB | @@ -78,7 +78,7 @@ import { grammars } from 'tm-grammars' | `fluent` | `ftl` | [macabeus/vscode-fluent](https://github.com/macabeus/vscode-fluent/blob/8544ea296a7769a359f43ddff4dc4b6c61f5cf59/syntaxes/fluent.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/macabeus/vscode-fluent/master/LICENSE) | | 3.39 kB | | `fortran-fixed-form` | `f` `for` `f77` | [fortran-lang/vscode-fortran-support](https://github.com/fortran-lang/vscode-fortran-support/blob/e642012094fc0a7379f204bb4e61243005afb1da/syntaxes/fortran_fixed-form.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/fortran-lang/vscode-fortran-support/main/LICENSE) | `fortran-free-form` | 905.00 B | | `fortran-free-form` | `f90` `f95` `f03` `f08` `f18` | [fortran-lang/vscode-fortran-support](https://github.com/fortran-lang/vscode-fortran-support/blob/f7fb41579770a0d8c75b9f295d167b31147b4f33/syntaxes/fortran_free-form.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/fortran-lang/vscode-fortran-support/main/LICENSE) | | 92.84 kB | -| `fsharp` | `f#` `fs` | [microsoft/vscode](https://github.com/microsoft/vscode/blob/9473445f7d3dcb5c579f42ece8b6c18c43c63ed3/extensions/fsharp/syntaxes/fsharp.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | `markdown` | 24.00 kB | +| `fsharp` | `f#` `fs` | [microsoft/vscode](https://github.com/microsoft/vscode/blob/03dc55030b3b2b5c4779d4ac1e2e46cd1f5a6b7c/extensions/fsharp/syntaxes/fsharp.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | `markdown` | 24.03 kB | | `gdresource` | | [godotengine/godot-vscode-plugin](https://github.com/godotengine/godot-vscode-plugin/blob/e7e2d0439dea0fb3a568378554c81e0a17348a84/syntaxes/GDResource.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/godotengine/godot-vscode-plugin/master/LICENSE) | `gdshader` `gdscript` | 4.88 kB | | `gdscript` | | [godotengine/godot-vscode-plugin](https://github.com/godotengine/godot-vscode-plugin/blob/9750f8dfc6e4eeba96f7df62432751930af95337/syntaxes/GDScript.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/godotengine/godot-vscode-plugin/master/LICENSE) | | 17.56 kB | | `gdshader` | | [godotengine/godot-vscode-plugin](https://github.com/godotengine/godot-vscode-plugin/blob/e7e2d0439dea0fb3a568378554c81e0a17348a84/syntaxes/GDShader.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/godotengine/godot-vscode-plugin/master/LICENSE) | | 5.95 kB | @@ -91,7 +91,7 @@ import { grammars } from 'tm-grammars' | `glimmer-ts` | `gts` | [lifeart/vsc-ember-syntax](https://github.com/lifeart/vsc-ember-syntax/blob/76fce7b360ce09a78789e7d5217b8955d1a5d95f/syntaxes/source.gts.json) | [MIT](https://raw.githubusercontent.com/lifeart/vsc-ember-syntax/master/LICENSE) | `typescript` `css` `javascript` `html` | 19.05 kB | | `glsl` | | [polym0rph/GLSL.tmbundle](https://github.com/polym0rph/GLSL.tmbundle/blob/6998d3bbd204e26746a5ca580cda4c650b9057b1/Syntaxes/GLSL.tmLanguage) | | `c` | 3.69 kB | | `gnuplot` | | [MarioSchwalbe/vscode-gnuplot](https://github.com/MarioSchwalbe/vscode-gnuplot/blob/c62c1a61c9b6b4658b43d76c397dc2ad43523b6a/syntaxes/gnuplot.tmLanguage) | [GPL-3.0](https://raw.githubusercontent.com/MarioSchwalbe/vscode-gnuplot/master/LICENSE) | | 13.83 kB | -| `go` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/ed4e6eda599f37bac9a11952403a6e63fd4f5a4d/extensions/go/syntaxes/go.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | 45.44 kB | +| `go` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/03dc55030b3b2b5c4779d4ac1e2e46cd1f5a6b7c/extensions/go/syntaxes/go.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | 45.04 kB | | `graphql` | `gql` | [prisma-labs/vscode-graphql](https://github.com/prisma-labs/vscode-graphql/blob/4569aef2364b42b6acd8188e4a6ca9b0ba3c6a1d/grammars/graphql.json) | [MIT](https://raw.githubusercontent.com/graphql/vscode-graphql/master/LICENSE) | `javascript` `typescript` `jsx` `tsx` | 17.10 kB | | `groovy` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/8fdf170a0850c1cc027382f31650aaf300d3ae2a/extensions/groovy/syntaxes/groovy.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | 18.54 kB | | `hack` | | [slackhq/vscode-hack](https://github.com/slackhq/vscode-hack/blob/b997653188b127a7261b0d26e7808217f3eb47bb/syntaxes/hack.json) | [MIT](https://raw.githubusercontent.com/slackhq/vscode-hack/master/LICENSE.md) | `html` `sql` | 80.39 kB | @@ -125,7 +125,7 @@ import { grammars } from 'tm-grammars' | `kusto` | `kql` | [rosshamish/kuskus](https://github.com/rosshamish/kuskus/blob/6e6deead4af243432902869e1767df8a612cffe1/kusto-syntax-highlighting/syntaxes/kusto.tmLanguage.json) | | | 19.60 kB | | `latex` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/9473445f7d3dcb5c579f42ece8b6c18c43c63ed3/extensions/latex/syntaxes/LaTeX.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | `tex` `shellscript` `css` `gnuplot` `haskell` `html` `java` `julia` `javascript` `lua` `python` `ruby` `rust` `typescript` `xml` `yaml` `scala` | 54.75 kB | | `lean` | `lean4` | [leanprover/vscode-lean4](https://github.com/leanprover/vscode-lean4/blob/2255bc20c9d28d868d04fb91428652a95cc87a92/vscode-lean4/syntaxes/lean4.json) | [Apache-2.0](https://raw.githubusercontent.com/leanprover/vscode-lean4/master/LICENSE) | | 3.94 kB | -| `less` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/9473445f7d3dcb5c579f42ece8b6c18c43c63ed3/extensions/less/syntaxes/less.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | 87.55 kB | +| `less` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/03dc55030b3b2b5c4779d4ac1e2e46cd1f5a6b7c/extensions/less/syntaxes/less.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | 96.57 kB | | `liquid` | | [Shopify/liquid-tm-grammar](https://github.com/Shopify/liquid-tm-grammar/blob/909aab5b1d8be374585bd02ef46e0e38d65f2f89/grammars/liquid.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/Shopify/liquid-tm-grammar/main/LICENSE.md) | `html` `css` `json` `javascript` | 15.31 kB | | `log` | | [emilast/vscode-logfile-highlighter](https://github.com/emilast/vscode-logfile-highlighter/blob/eb50e785c27b4b4f7dbf6c0e801c58fe91baef5d/syntaxes/log.tmLanguage) | [MIT](https://raw.githubusercontent.com/emilast/vscode-logfile-highlighter/master/LICENSE) | | 2.51 kB | | `logo` | | [textmate/logo.tmbundle](https://github.com/textmate/logo.tmbundle/blob/3205e987ed2a2aa11accdd55a7d094832441f89c/Syntaxes/Logo.tmLanguage) | | | 3.03 kB | @@ -177,7 +177,7 @@ import { grammars } from 'tm-grammars' | `riscv` | | [zhuanhao-wu/vscode-riscv-support](https://github.com/zhuanhao-wu/vscode-riscv-support/blob/2736b60e45ff2ef738d784055e136cf38d6290cd/syntaxes/riscv.tmLanguage) | [MIT](https://raw.githubusercontent.com/zhuanhao-wu/vscode-riscv-support/master/LICENSE) | | 6.98 kB | | `rst` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/48e93f756b764991ede33ad09781a863aca6907a/extensions/restructuredtext/syntaxes/rst.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | `html-derivative` `cpp` `python` `javascript` `shellscript` `yaml` `cmake` `ruby` | 9.03 kB | | `ruby` | `rb` | [microsoft/vscode](https://github.com/microsoft/vscode/blob/17e7a257ffc86a48318cefd8f3b904dc546a4314/extensions/ruby/syntaxes/ruby.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | `html` `xml` `sql` `css` `c` `javascript` `shellscript` `lua` | 35.97 kB | -| `rust` | `rs` | [microsoft/vscode](https://github.com/microsoft/vscode/blob/b557947e50a068bdcc927ffd31ee555dbb232558/extensions/rust/syntaxes/rust.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | 16.77 kB | +| `rust` | `rs` | [microsoft/vscode](https://github.com/microsoft/vscode/blob/03dc55030b3b2b5c4779d4ac1e2e46cd1f5a6b7c/extensions/rust/syntaxes/rust.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | 16.82 kB | | `sas` | | [rpardee/sas](https://github.com/rpardee/sas/blob/49f6e733c6c0b918a2a825ca2f63dba704f3e8c0/syntaxes/sas.tmLanguage) | [MIT](https://raw.githubusercontent.com/rpardee/sas/master/LICENSE) | `sql` | 9.30 kB | | `sass` | | [TheRealSyler/vscode-sass-indented](https://github.com/TheRealSyler/vscode-sass-indented/blob/7b0bd6bbbb768c0cf21b2aa0899cb872ee42fd50/syntaxes/sass.tmLanguage.json) | [NOASSERTION](https://raw.githubusercontent.com/TheRealSyler/vscode-sass-indented/master/LICENSE) | | 8.83 kB | | `scala` | | [scala/vscode-scala-syntax](https://github.com/scala/vscode-scala-syntax/blob/1addd66a1bcb65510348ee6dddb5acfcf51f4fba/syntaxes/Scala.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/scala/vscode-scala-syntax/main/LICENSE.md) | | 26.83 kB | diff --git a/packages/tm-grammars/grammars/dart.json b/packages/tm-grammars/grammars/dart.json index a30e73c..09746a0 100644 --- a/packages/tm-grammars/grammars/dart.json +++ b/packages/tm-grammars/grammars/dart.json @@ -190,7 +190,7 @@ "name": "variable.language.dart" }, { - "match": "(?\\])?\\s*(private|internal|public)?\\s+(\\[[^-=]*\\]|[_A-Za-z]([_A-Za-z0-9\\._]+)*|``[_A-Za-z]([_A-Za-z0-9\\._`\\s]+|(?<=,)\\s)*)?", + "begin": "\\b(let mutable|static let mutable|static let|let inline|let|and|member val|member inline|static member inline|static member val|static member|default|member|override|let!)(\\s+rec|mutable)?(\\s+\\[\\<.*\\>\\])?\\s*(private|internal|public)?\\s+(\\[[^-=]*\\]|[_A-Za-z]([_A-Za-z0-9\\._]+)*|``[_A-Za-z]([_A-Za-z0-9\\._`\\s]+|(?<=,)\\s)*)?", "beginCaptures": { "1": { "name": "keyword.fsharp" @@ -1067,7 +1067,7 @@ "name": "keyword.symbol.arrow.fsharp" }, { - "match": "(&&&|\\|\\|\\||\\^\\^\\^|~~~|~\\+|~\\-|<<<|>>>|\\|>|:>|:\\?>|:|\\[|\\]|\\;|<>|=|@|\\|\\||&&|&|%|{|}|\\||_|\\.\\.|\\,|\\+|\\-|\\*|\\/|\\^|\\!|\\>|\\>\\=|\\>\\>|\\<|\\<\\=|\\(|\\)|\\<\\<)", + "match": "[.?]*(&&&|\\|\\|\\||\\^\\^\\^|~~~|~\\+|~\\-|<<<|>>>|\\|>|:>|:\\?>|:|\\[|\\]|\\;|<>|=|@|\\|\\||&&|&|%|{|}|\\||_|\\.\\.|\\,|\\+|\\-|\\*|\\/|\\^|\\!|\\>|\\>\\=|\\>\\>|\\<|\\<\\=|\\(|\\)|\\<\\<)[.?]*", "name": "keyword.symbol.fsharp" } ] diff --git a/packages/tm-grammars/grammars/go.json b/packages/tm-grammars/grammars/go.json index 1b4a3a1..b77594f 100644 --- a/packages/tm-grammars/grammars/go.json +++ b/packages/tm-grammars/grammars/go.json @@ -2234,29 +2234,6 @@ } ] }, - { - "begin": "(?:((?:(?:\\s*(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?(?)=?)|=|\\/", + "name": "keyword.operator.comparison.less" + }, + { + "match": ":", + "name": "punctuation.separator.key-value.less" + }, + { + "match": "portrait|landscape", + "name": "support.constant.property-value.less" + }, + { + "include": "#numeric-values" + }, + { + "match": "\\/", + "name": "keyword.operator.arithmetic.less" + }, + { + "include": "#var-function" + }, + { + "include": "#less-variables" + }, + { + "include": "#less-variable-interpolation" + } + ] + }, + { + "include": "#style-function" + }, + { + "match": "--|(?:-?(?:(?:[a-zA-Z_]|[\\x{00B7}\\x{00C0}-\\x{00D6}\\x{00D8}-\\x{00F6}\\x{00F8}-\\x{037D}\\x{037F}-\\x{1FFF}\\x{200C}\\x{200D}\\x{203F}\\x{2040}\\x{2070}-\\x{218F}\\x{2C00}-\\x{2FEF}\\x{3001}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFFD}\\x{10000}-\\x{EFFFF}])|(?:\\\\(?:\\N|[^0-9A-Fa-f]|[0-9A-Fa-f]{1,6}[\\s\\R]))))(?:(?:[-\\da-zA-Z_]|[\\x{00B7}\\x{00C0}-\\x{00D6}\\x{00D8}-\\x{00F6}\\x{00F8}-\\x{037D}\\x{037F}-\\x{1FFF}\\x{200C}\\x{200D}\\x{203F}\\x{2040}\\x{2070}-\\x{218F}\\x{2C00}-\\x{2FEF}\\x{3001}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFFD}\\x{10000}-\\x{EFFFF}])|(?:\\\\(?:\\N|[^0-9A-Fa-f]|[0-9A-Fa-f]{1,6}[\\s\\R])))*", + "name": "variable.parameter.container-name.css" + }, + { + "include": "#arbitrary-repetition" + }, + { + "include": "#less-variables" + } + ] + } + ] + }, + { + "begin": "\\s*(\\{)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.block.begin.less" + } + }, + "end": "(?=\\})", + "patterns": [ + { + "include": "#rule-list-body" + }, + { + "include": "$self" + } + ] + } + ] + }, "at-counter-style": { "begin": "\\s*((@)counter-style\\b)\\s+(?:(?i:\\b(decimal|none)\\b)|(-?(?:[[_a-zA-Z][^\\x{00}-\\x{7F}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))*))\\s*(?=\\{|$)", - "captures": { + "beginCaptures": { "1": { "name": "keyword.control.at-rule.counter-style.less" }, @@ -126,7 +249,7 @@ }, "at-font-face": { "begin": "\\s*((@)font-face)\\s*(?=\\{|$)", - "captures": { + "beginCaptures": { "1": { "name": "keyword.control.at-rule.font-face.less" }, @@ -213,7 +336,7 @@ ] }, "at-keyframes": { - "begin": "\\s*((@)(-webkit-|-moz-|-o-)?keyframes)(?=.*?\\{)", + "begin": "\\s*((@)keyframes)(?=.*?\\{)", "beginCaptures": { "1": { "name": "keyword.control.at-rule.keyframe.less" @@ -221,9 +344,6 @@ "2": { "name": "punctuation.definition.keyword.less" }, - "3": { - "name": "support.type.property-vendor.less" - }, "4": { "name": "support.constant.keyframe.less" } @@ -388,6 +508,9 @@ { "include": "#at-charset" }, + { + "include": "#at-container" + }, { "include": "#at-counter-style" }, @@ -502,44 +625,6 @@ } ] }, - "at-viewport": { - "begin": "((@(-ms-)?)viewport)", - "beginCaptures": { - "1": { - "name": "keyword.control.at-rule.viewport.less" - }, - "2": { - "name": "punctuation.definition.keyword.less" - }, - "3": { - "name": "support.type.vendor-prefix.less" - } - }, - "end": "\\}", - "endCaptures": { - "0": { - "name": "punctuation.definition.block.end.less" - } - }, - "name": "meta.at-rule.viewport.less", - "patterns": [ - { - "begin": "\\{", - "captures": { - "0": { - "name": "punctuation.definition.block.begin.less" - } - }, - "end": "(?=\\})", - "name": "meta.block.less", - "patterns": [ - { - "include": "#rule-list-body" - } - ] - } - ] - }, "attr-function": { "begin": "\\b(attr)(?=\\()", "beginCaptures": { @@ -920,12 +1005,17 @@ "patterns": [ { "begin": "/\\*", - "captures": { + "beginCaptures": { "0": { "name": "punctuation.definition.comment.less" } }, "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.less" + } + }, "name": "comment.block.less" }, { @@ -1170,10 +1260,10 @@ "include": "#time-type" }, { - "include": "#length-type" + "include": "#percentage-type" }, { - "include": "#resolution-type" + "include": "#length-type" } ] }, @@ -1392,10 +1482,10 @@ "include": "#calc-function" }, { - "include": "#length-type" + "include": "#percentage-type" }, { - "include": "#percentage-type" + "include": "#length-type" } ] } @@ -1445,6 +1535,10 @@ "match": "(?i:[-+]?(?:(?:\\d*\\.\\d+(?:[eE](?:[-+]?\\d+))*)|(?:[-+]?\\d+))(Hz|kHz))\\b", "name": "constant.numeric.less" }, + "global-property-values": { + "match": "\\b(?:initial|inherit|unset|revert-layer|revert)\\b", + "name": "support.constant.property-value.less" + }, "gradient-functions": { "patterns": [ { @@ -1701,13 +1795,21 @@ } }, "length-type": { - "captures": { - "1": { - "name": "keyword.other.unit.less" + "patterns": [ + { + "captures": { + "1": { + "name": "keyword.other.unit.less" + } + }, + "match": "(?:[-+]?)(?:\\d+\\.\\d+|\\.?\\d+)(?:[eE][-+]?\\d+)?(em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|m|q|in|pt|pc|px|fr|dpi|dpcm|dppx|x)", + "name": "constant.numeric.less" + }, + { + "match": "\\b(?:[-+]?)0\\b", + "name": "constant.numeric.less" } - }, - "match": "0|(?i:[-+]?(?:(?:\\d*\\.\\d+(?:[eE](?:[-+]?\\d+))*)|(?:[-+]?\\d+))(em|ex|ch|rem|vw|vh|vmin|vmax|(c|m)?m|q|in|pt|pc|px|fr))\\b", - "name": "constant.numeric.less" + ] }, "less-boolean-function": { "begin": "\\b(boolean)(?=\\()", @@ -2639,9 +2741,6 @@ { "include": "#less-variables" }, - { - "include": "#dimensions" - }, { "include": "#numeric-values" }, @@ -2933,14 +3032,6 @@ { "include": "#comma-delimiter" }, - { - "captures": { - "1": { - "name": "punctuation.terminator.rule.less" - } - }, - "match": "\\s*(;)|(?=[})])" - }, { "include": "#property-values" }, @@ -2948,17 +3039,14 @@ "include": "#rule-list-body" } ] - } - ] - }, - "less-number-units": { - "patterns": [ - { - "match": "\\b((c|m)?m|in|p(t|c)|m?s|g?rad|deg|turn)\\b", - "name": "keyword.other.unit.less" }, { - "match": "\\b(r?em|ex|ch|vw|vh|vmin|vmax|cm|mm|q|in|pt|pc|px|fr|s|ms|Hz|kHz|dpi|dpcm|dppx|deg|grad|rad|turn)\\b" + "captures": { + "1": { + "name": "punctuation.terminator.rule.less" + } + }, + "match": "(;)|(?=[})])" } ] }, @@ -3344,16 +3432,23 @@ "name": "variable.other.readwrite.less" }, "less-variables": { - "captures": { - "1": { - "name": "punctuation.definition.variable.less" + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.variable.less" + }, + "2": { + "name": "support.other.variable.less" + } + }, + "match": "\\s*(@@?)([-\\w]+)", + "name": "variable.other.readwrite.less" }, - "2": { - "name": "support.other.variable.less" + { + "include": "#less-variable-interpolation" } - }, - "match": "\\s*(@@?)([-\\w]+)", - "name": "variable.other.readwrite.less" + ] }, "literal-string": { "patterns": [ @@ -3481,16 +3576,10 @@ "name": "meta.group.less", "patterns": [ { - "begin": "((-webkit-|-o-)?((min|max)-)?(-moz-)?(((device-)?(height|width|aspect-ratio|pixel-ratio))|(color(-index)?)|monochrome|resolution))|grid|scan|orientation\\s*(?=[:)])", + "begin": "(--|(?:-?(?:(?:[a-zA-Z_]|[\\x{00B7}\\x{00C0}-\\x{00D6}\\x{00D8}-\\x{00F6}\\x{00F8}-\\x{037D}\\x{037F}-\\x{1FFF}\\x{200C}\\x{200D}\\x{203F}\\x{2040}\\x{2070}-\\x{218F}\\x{2C00}-\\x{2FEF}\\x{3001}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFFD}\\x{10000}-\\x{EFFFF}])|(?:\\\\(?:\\N|[^0-9A-Fa-f]|[0-9A-Fa-f]{1,6}[\\s\\R]))))(?:(?:[-\\da-zA-Z_]|[\\x{00B7}\\x{00C0}-\\x{00D6}\\x{00D8}-\\x{00F6}\\x{00F8}-\\x{037D}\\x{037F}-\\x{1FFF}\\x{200C}\\x{200D}\\x{203F}\\x{2040}\\x{2070}-\\x{218F}\\x{2C00}-\\x{2FEF}\\x{3001}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFFD}\\x{10000}-\\x{EFFFF}])|(?:\\\\(?:\\N|[^0-9A-Fa-f]|[0-9A-Fa-f]{1,6}[\\s\\R])))*)\\s*(?=[:)])", "beginCaptures": { "0": { "name": "support.type.property-name.media.less" - }, - "2": { - "name": "support.type.vendor-prefix.less" - }, - "5": { - "name": "support.type.vendor-prefix.less" } }, "end": "(((\\+_?)?):)|(?=\\))", @@ -3579,7 +3668,7 @@ ] }, "number-type": { - "match": "[-+]?(?:(?:\\d*\\.\\d+(?:[eE](?:[-+]?\\d+))*)|(?:[-+]?\\d+))", + "match": "(?:[-+]?)(?:\\d+\\.\\d+|\\.?\\d+)(?:[eE][-+]?\\d+)?", "name": "constant.numeric.less" }, "numeric-values": { @@ -3601,7 +3690,7 @@ "name": "keyword.other.unit.less" } }, - "match": "[-+]?(?:(?:\\d*\\.\\d+(?:[eE](?:[-+]?\\d+))*)|(?:[-+]?\\d+))(%)", + "match": "(?:[-+]?)(?:\\d+\\.\\d+|\\.?\\d+)(?:[eE][-+]?\\d+)?(%)", "name": "constant.numeric.less" }, "property-list": { @@ -3626,18 +3715,16 @@ "patterns": [ { "comment": "align-content, align-items, align-self, justify-content, justify-items, justify-self", - "match": "\\b(?:flex-start|flex-end|start|end|space-between|space-around|space-evenly|stretch|baseline|safe|unsafe|legacy|anchor-center|first|last|self-start|self-end)\\b", + "match": "\\b(flex-start|flex-end|start|end|space-between|space-around|space-evenly|stretch|baseline|safe|unsafe|legacy|anchor-center|first|last|self-start|self-end)\\b", "name": "support.constant.property-value.less" }, { "comment": "alignment-baseline", - "match": "\\b(?:text-before-edge|before-edge|middle|central|text-after-edge|after-edge|ideographic|alphabetic|hanging|mathematical|top|center|bottom)\\b", + "match": "\\b(text-before-edge|before-edge|middle|central|text-after-edge|after-edge|ideographic|alphabetic|hanging|mathematical|top|center|bottom)\\b", "name": "support.constant.property-value.less" }, { - "comment": "all/global values", - "match": "\\b(?:initial|inherit|unset|revert-layer|revert)\\b", - "name": "support.constant.property-value.less" + "include": "#global-property-values" }, { "include": "#cubic-bezier-function" @@ -3677,15 +3764,15 @@ }, { "comment": "animation-timing-function", - "match": "\\b(?:linear|ease-in-out|ease-in|ease-out|ease|step-start|step-end)\\b", + "match": "\\b(linear|ease-in-out|ease-in|ease-out|ease|step-start|step-end)\\b", "name": "support.constant.property-value.less" }, { - "match": "\\b(absolute|active|add|all(-(petite|small)-caps|-scroll)?|alpha(betic)?|alternate(-reverse)?|always|annotation|antialiased|at|auto(hiding-scrollbar)?|avoid(-column|-page|-region)?|background(-color|-image|-position|-size)?|backwards|balance|baseline|below|bevel|bicubic|bidi-override|blink|block(-(line-height|start|end))?|blur|bold(er)?|border-top-left-radius|border-top-right-radius|border-bottom-left-radius|border-bottom-right-radius|border-end-end-radius|border-end-start-radius|border-start-end-radius|border-start-start-radius|border-block-start-color|border-block-start-style|border-block-start-width|border-block-start|border-block-end-color|border-block-end-style|border-block-end-width|border-block-end|border-block-color|border-block-style|border-block-width|border-block|border-inline-start-color|border-inline-start-style|border-inline-start-width|border-inline-start|border-inline-end-color|border-inline-end-style|border-inline-end-width|border-inline-end|border-inline-color|border-inline-style|border-inline-width|border-inline|border-top-color|border-top-style|border-top-width|border-top|border-right-color|border-right-style|border-right-width|border-right|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-left-color|border-left-style|border-left-width|border-left|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-image|border-color|border-style|border-width|border-radius|border-collapse|border-spacing|border|both|bottom|box(-shadow)?|break-(all|word|spaces)|brightness|butt(on)?|capitalize|cent(er|ral)|char(acter-variant)?|cjk-ideographic|clip|clone|close-quote|closest-(corner|side)|col-resize|collapse|color(-stop|-burn|-dodge)?|column((-count|-gap|-reverse|-rule(-color|-width)?|-width)|s)?|common-ligatures|condensed|consider-shifts|contain|content(-box|s)?|contextual|contrast|cover|crisp(-e|E)dges|crop|cross(hair)?|da(rken|shed)|default|dense|diagonal-fractions|difference|disabled|discard|discretionary-ligatures|disregard-shifts|distribute(-all-lines|-letter|-space)?|dotted|double|drop-shadow|(nwse|nesw|ns|ew|sw|se|nw|ne|w|s|e|n)-resize|ease(-in-out|-in|-out)?|element|ellipsis|embed|end|EndColorStr|evenodd|exclu(de(-ruby)?|sion)|expanded|(extra|semi|ultra)-(condensed|expanded)|farthest-(corner|side)?|fill(-box|-opacity)?|filter|fit-content|fixed|flat|flex((-basis|-end|-grow|-shrink|-start)|box)?|flip|flood-color|font(-size(-adjust)?|-stretch|-weight)?|forwards|from(-image)?|full-width|gap|geometricPrecision|glyphs|gradient|grayscale|grid((-column|-row)?-gap|-height)?|groove|hand|hanging|hard-light|height|help|hidden|hide|historical-(forms|ligatures)|horizontal(-tb)?|hue|ideograph(-alpha|-numeric|-parenthesis|-space|ic)|inactive|include-ruby|infinite|inherit|initial|inline(-(block|box|flex(box)?|line-height|table|start|end))?|inset|inside|inter(-ideograph|-word|sect)|invert|isolat(e|ion)|italic|jis(04|78|83|90)|justify(-all)?|keep-all|large[r]?|last|layout|left|letter-spacing|light(e[nr]|ing-color)|line(-edge|-height|-through)?|linear(-gradient|RGB)?|lining-nums|list-item|local|loose|lowercase|lr-tb|ltr|lumin(osity|ance)|manual|manipulation|margin(-bottom|-box|-left|-right|-top)?|marker(-offset|s)?|match-parent|mathematical|max-(content|height|lines|size|width)|medium|middle|min-(content|height|width)|miter|mixed|move|multiply|newspaper|no-(change|clip|(close|open)-quote|(common|discretionary|historical)-ligatures|contextual|drop|repeat)|none|nonzero|normal|not-allowed|nowrap|oblique|offset(-after|-before|-end|-start)?|oldstyle-nums|opacity|open-quote|optimize(Legibility|Precision|Quality|Speed)|order|ordinal|ornaments|outline(-color|-offset|-width)?|outset|outside|over(line|-edge|lay)|padding(-bottom|-box|-left|-right|-top|-box)?|page|paint(ed)?|paused|pan-(x|left|right|y|up|down)|perspective-origin|petite-caps|pixelated|pointer|pinch-zoom|pretty|pre(-line|-wrap)?|preserve(-3d|-breaks|-spaces)?|progid:DXImageTransform.Microsoft.(Alpha|Blur|dropshadow|gradient|Shadow)|progress|proportional-(nums|width)|radial-gradient|recto|region|relative|repeat(-[xy])?|repeating-(linear|radial)-gradient|replaced|reset-size|reverse|revert(-layer)?|ridge|right|round|row(-gap|-resize|-reverse)?|rtl|ruby|running|saturat(e|ion)|screen|scroll(-position|bar)?|separate|sepia|scale-down|shape-(image-threshold|margin|outside)|show|sideways(-lr|-rl)?|simplified|size|slashed-zero|slice|small(-caps|er)?|smooth|snap|solid|soft-light|space(-around|-between)?|span|sRGB|stable|stack(ed-fractions)?|start(ColorStr)?|static|step-(end|start)|sticky|stop-(color|opacity)|stretch|strict|stroke(-box|-dash(array|offset)|-miterlimit|-opacity|-width)?|style(set)?|stylistic|sub(grid|pixel-antialiased|tract)?|super|swash|table(-caption|-cell|(-column|-footer|-header|-row)-group|-column|-row)?|tabular-nums|tb-rl|text((-bottom|-(decoration|emphasis)-color|-indent|-(over|under)-edge|-shadow|-size(-adjust)?|-top)|field)?|thi(ck|n)|titling-ca(ps|se)|to[p]?|touch|traditional|transform(-origin)?|under(-edge|line)?|unicase|unset|uppercase|upright|use-(glyph-orientation|script)|verso|vertical(-align|-ideographic|-lr|-rl|-text)?|view-box|viewport-fill(-opacity)?|visibility|visible(Fill|Painted|Stroke)?|wait|wavy|weight|whitespace|(device-)?width|word-spacing|wrap(-reverse)?|x{1,2}-(large|small)|z-index|zero|zoom(-in|-out)?|((?i:arabic-indic|armenian|bengali|cambodian|circle|cjk-decimal|cjk-earthly-branch|cjk-heavenly-stem|decimal-leading-zero|decimal|devanagari|disclosure-closed|disclosure-open|disc|ethiopic-numeric|georgian|gujarati|gurmukhi|hebrew|hiragana-iroha|hiragana|japanese-formal|japanese-informal|kannada|katakana-iroha|katakana|khmer|korean-hangul-formal|korean-hanja-formal|korean-hanja-informal|lao|lower-alpha|lower-armenian|lower-greek|lower-latin|lower-roman|malayalam|mongolian|myanmar|oriya|persian|simp-chinese-formal|simp-chinese-informal|square|tamil|telugu|thai|tibetan|trad-chinese-formal|trad-chinese-informal|upper-alpha|upper-armenian|upper-latin|upper-roman)))\\b", + "match": "\\b(absolute|active|add|all-petite-caps|all-small-caps|all-scroll|all|alphabetic|alpha|alternate-reverse|alternate|always|annotation|antialiased|at|autohiding-scrollbar|auto|avoid-column|avoid-page|avoid-region|avoid|background-color|background-image|background-position|background-size|background-repeat|background|backwards|balance|baseline|below|bevel|bicubic|bidi-override|blink|block-line-height|block-start|block-end|block|blur|bolder|bold|border-top-left-radius|border-top-right-radius|border-bottom-left-radius|border-bottom-right-radius|border-end-end-radius|border-end-start-radius|border-start-end-radius|border-start-start-radius|border-block-start-color|border-block-start-style|border-block-start-width|border-block-start|border-block-end-color|border-block-end-style|border-block-end-width|border-block-end|border-block-color|border-block-style|border-block-width|border-block|border-inline-start-color|border-inline-start-style|border-inline-start-width|border-inline-start|border-inline-end-color|border-inline-end-style|border-inline-end-width|border-inline-end|border-inline-color|border-inline-style|border-inline-width|border-inline|border-top-color|border-top-style|border-top-width|border-top|border-right-color|border-right-style|border-right-width|border-right|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-left-color|border-left-style|border-left-width|border-left|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-image|border-color|border-style|border-width|border-radius|border-collapse|border-spacing|border|both|bottom|box-shadow|box|break-all|break-word|break-spaces|brightness|butt(on)?|capitalize|central|center|char(acter-variant)?|cjk-ideographic|clip|clone|close-quote|closest-corner|closest-side|col-resize|collapse|color-stop|color-burn|color-dodge|color|column-count|column-gap|column-reverse|column-rule-color|column-rule-width|column-rule|column-width|columns|column|common-ligatures|condensed|consider-shifts|contain|content-box|contents?|contextual|contrast|cover|crisp-edges|crispEdges|crop|crosshair|cross|darken|dashed|default|dense|device-width|diagonal-fractions|difference|disabled|discard|discretionary-ligatures|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|drop-shadow|[nsew]{1,4}-resize|ease-in-out|ease-in|ease-out|ease|element|ellipsis|embed|end|EndColorStr|evenodd|exclude-ruby|exclusion|expanded|extra-condensed|extra-expanded|farthest-corner|farthest-side|farthest|fill-box|fill-opacity|fill|filter|fit-content|fixed|flat|flex-basis|flex-end|flex-grow|flex-shrink|flex-start|flexbox|flex|flip|flood-color|font-size-adjust|font-size|font-stretch|font-weight|font|forwards|from-image|from|full-width|gap|geometricPrecision|glyphs|gradient|grayscale|grid-column-gap|grid-column|grid-row-gap|grid-row|grid-gap|grid-height|grid|groove|hand|hanging|hard-light|height|help|hidden|hide|historical-forms|historical-ligatures|horizontal-tb|horizontal|hue|ideographic|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|include-ruby|infinite|inherit|initial|inline-end|inline-size|inline-start|inline-table|inline-line-height|inline-flexbox|inline-flex|inline-box|inline-block|inline|inset|inside|inter-ideograph|inter-word|intersect|invert|isolate|isolation|italic|jis(04|78|83|90)|justify-all|justify|keep-all|larger|large|last|layout|left|letter-spacing|lighten|lighter|lighting-color|linear-gradient|linearRGB|linear|line-edge|line-height|line-through|line|lining-nums|list-item|local|loose|lowercase|lr-tb|ltr|luminosity|luminance|manual|manipulation|margin-bottom|margin-box|margin-left|margin-right|margin-top|margin|marker(-offset|s)?|match-parent|mathematical|max-(content|height|lines|size|width)|medium|middle|min-(content|height|width)|miter|mixed|move|multiply|newspaper|no-change|no-clip|no-close-quote|no-open-quote|no-common-ligatures|no-discretionary-ligatures|no-historical-ligatures|no-contextual|no-drop|no-repeat|none|nonzero|normal|not-allowed|nowrap|oblique|offset-after|offset-before|offset-end|offset-start|offset|oldstyle-nums|opacity|open-quote|optimize(Legibility|Precision|Quality|Speed)|order|ordinal|ornaments|outline-color|outline-offset|outline-width|outline|outset|outside|overline|over-edge|overlay|padding(-bottom|-box|-left|-right|-top|-box)?|page|paint(ed)?|paused|pan-(x|left|right|y|up|down)|perspective-origin|petite-caps|pixelated|pointer|pinch-zoom|pretty|pre(-line|-wrap)?|preserve-3d|preserve-breaks|preserve-spaces|preserve|progid:DXImageTransform\\.Microsoft\\.(Alpha|Blur|dropshadow|gradient|Shadow)|progress|proportional-nums|proportional-width|radial-gradient|recto|region|relative|repeating-linear-gradient|repeating-radial-gradient|repeat-x|repeat-y|repeat|replaced|reset-size|reverse|revert-layer|revert|ridge|right|round|row-gap|row-resize|row-reverse|row|rtl|ruby|running|saturate|saturation|screen|scrollbar|scroll-position|scroll|separate|sepia|scale-down|semi-condensed|semi-expanded|shape-image-threshold|shape-margin|shape-outside|show|sideways-lr|sideways-rl|sideways|simplified|size|slashed-zero|slice|small-caps|smaller|small|smooth|snap|solid|soft-light|space-around|space-between|space|span|sRGB|stable|stacked-fractions|stack|startColorStr|start|static|step-end|step-start|sticky|stop-color|stop-opacity|stretch|strict|stroke-box|stroke-dasharray|stroke-dashoffset|stroke-miterlimit|stroke-opacity|stroke-width|stroke|styleset|style|stylistic|subgrid|subpixel-antialiased|subtract|super|swash|table-caption|table-cell|table-column-group|table-footer-group|table-header-group|table-row-group|table-column|table-row|table|tabular-nums|tb-rl|text((-bottom|-(decoration|emphasis)-color|-indent|-(over|under)-edge|-shadow|-size(-adjust)?|-top)|field)?|thick|thin|titling-caps|titling-case|top|touch|to|traditional|transform-origin|transform-style|transform|ultra-condensed|ultra-expanded|under-edge|underline|unicase|unset|uppercase|upright|use-glyph-orientation|use-script|verso|vertical(-align|-ideographic|-lr|-rl|-text)?|view-box|viewport-fill-opacity|viewport-fill|visibility|visibleFill|visiblePainted|visibleStroke|visible|wait|wavy|weight|whitespace|width|word-spacing|wrap-reverse|wrap-reverse|wrap|xx?-(large|small)|z-index|zero|zoom-in|zoom-out|zoom|arabic-indic|armenian|bengali|cambodian|circle|cjk-decimal|cjk-earthly-branch|cjk-heavenly-stem|decimal-leading-zero|decimal|devanagari|disclosure-closed|disclosure-open|disc|ethiopic-numeric|georgian|gujarati|gurmukhi|hebrew|hiragana-iroha|hiragana|japanese-formal|japanese-informal|kannada|katakana-iroha|katakana|khmer|korean-hangul-formal|korean-hanja-formal|korean-hanja-informal|lao|lower-alpha|lower-armenian|lower-greek|lower-latin|lower-roman|malayalam|mongolian|myanmar|oriya|persian|simp-chinese-formal|simp-chinese-informal|square|tamil|telugu|thai|tibetan|trad-chinese-formal|trad-chinese-informal|upper-alpha|upper-armenian|upper-latin|upper-roman)\\b", "name": "support.constant.property-value.less" }, { - "match": "\\b(?i:sans-serif|serif|monospace|fantasy|cursive)\\b(?=\\s*[;,\\n}])", + "match": "\\b(sans-serif|serif|monospace|fantasy|cursive)\\b(?=\\s*[;,\\n}])", "name": "support.constant.font-name.less" } ] @@ -3695,9 +3782,6 @@ { "include": "#comment-block" }, - { - "include": "#vendor-prefix" - }, { "include": "#builtin-functions" }, @@ -3736,11 +3820,46 @@ } ] }, - "pseudo-classes": { + "pseudo-selectors": { "patterns": [ { - "begin": "(:)(dir|lang)(?=\\()", - "captures": { + "begin": "(:)(dir)(?=\\()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.entity.less" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.group.end.less" + } + }, + "name": "entity.other.attribute-name.pseudo-class.less", + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.group.begin.less" + } + }, + "end": "(?=\\))", + "patterns": [ + { + "match": "ltr|rtl", + "name": "variable.parameter.dir.less" + }, + { + "include": "#less-variables" + } + ] + } + ] + }, + { + "begin": "(:)(lang)(?=\\()", + "beginCaptures": { "1": { "name": "punctuation.definition.entity.less" } @@ -3762,6 +3881,12 @@ }, "end": "(?=\\))", "patterns": [ + { + "include": "#less-variables" + }, + { + "include": "#literal-string" + }, { "include": "#unquoted-string" } @@ -3771,7 +3896,7 @@ }, { "begin": "(:)(not)(?=\\()", - "captures": { + "beginCaptures": { "1": { "name": "punctuation.definition.entity.less" } @@ -3802,7 +3927,7 @@ }, { "begin": "(:)(nth(-last)?-(child|of-type))(?=\\()", - "captures": { + "beginCaptures": { "1": { "name": "punctuation.definition.entity.less" }, @@ -3810,13 +3935,14 @@ "name": "entity.other.attribute-name.pseudo-class.less" } }, + "contentName": "meta.function-call.less", "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.group.end.less" } }, - "name": "meta.function-call.less", + "name": "entity.other.attribute-name.pseudo-class.less", "patterns": [ { "begin": "\\(", @@ -3835,10 +3961,16 @@ { "captures": { "1": { + "name": "keyword.operator.arithmetic.less" + }, + "2": { "name": "keyword.other.unit.less" + }, + "4": { + "name": "keyword.operator.arithmetic.less" } }, - "match": "(?:[-+]?(?:\\d+)?(n)(\\s*[-+]\\s*\\d+)?|[-+]?\\s*\\d+)", + "match": "(?:([-+])?(?:\\d+)?(n)(\\s*([-+])\\s*\\d+)?|[-+]?\\s*\\d+)", "name": "constant.numeric.less" }, { @@ -3855,8 +3987,8 @@ ] }, { - "begin": "(:)(host-context)(?=\\()", - "captures": { + "begin": "(:)(host-context|host|has|is|not|where)(?=\\()", + "beginCaptures": { "1": { "name": "punctuation.definition.entity.less" } @@ -3894,27 +4026,24 @@ "name": "entity.other.attribute-name.pseudo-class.less" } }, - "match": "(:)(active|any|checked|default|disabled|empty|enabled|first(-(child|of-type))?|fullscreen|focus|host|hover|indeterminate|in-range|invalid|last-(child|of-type)|left|link|only-(child|of-type)|optional|out-of-range|read-(only|write)|required|right|root|scope|target|valid|visited)", + "match": "(:)(active|any-link|autofill|blank|buffering|checked|current|default|defined|disabled|empty|enabled|first-child|first-of-type|first|focus-visible|focus-within|focus|fullscreen|future|host|hover|in-range|indeterminate|invalid|last-child|last-of-type|left|local-link|link|modal|muted|only-child|only-of-type|optional|out-of-range|past|paused|picture-in-picture|placeholder-shown|playing|popover-open|read-only|read-write|required|right|root|scope|seeking|stalled|target-within|target|user-invalid|user-valid|valid|visited|volume-locked)\\b", "name": "meta.function-call.less" - } - ] - }, - "pseudo-elements": { - "patterns": [ + }, { - "begin": "(::)(slotted)(?=\\()", - "captures": { + "begin": "(::?)(highlight|part|state)(?=\\s*(\\())", + "beginCaptures": { "1": { "name": "punctuation.definition.entity.less" } }, + "comment": "::highlight()", "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.group.end.less" } }, - "name": "entity.other.attribute-name.pseudo-class.less", + "name": "entity.other.attribute-name.pseudo-element.less", "patterns": [ { "begin": "\\(", @@ -3924,6 +4053,44 @@ } }, "end": "(?=\\))", + "patterns": [ + { + "match": "--|(?:-?(?:(?:[a-zA-Z_]|[\\x{00B7}\\x{00C0}-\\x{00D6}\\x{00D8}-\\x{00F6}\\x{00F8}-\\x{037D}\\x{037F}-\\x{1FFF}\\x{200C}\\x{200D}\\x{203F}\\x{2040}\\x{2070}-\\x{218F}\\x{2C00}-\\x{2FEF}\\x{3001}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFFD}\\x{10000}-\\x{EFFFF}])|(?:\\\\(?:\\N|[^0-9A-Fa-f]|[0-9A-Fa-f]{1,6}[\\s\\R]))))(?:(?:[-\\da-zA-Z_]|[\\x{00B7}\\x{00C0}-\\x{00D6}\\x{00D8}-\\x{00F6}\\x{00F8}-\\x{037D}\\x{037F}-\\x{1FFF}\\x{200C}\\x{200D}\\x{203F}\\x{2040}\\x{2070}-\\x{218F}\\x{2C00}-\\x{2FEF}\\x{3001}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFFD}\\x{10000}-\\x{EFFFF}])|(?:\\\\(?:\\N|[^0-9A-Fa-f]|[0-9A-Fa-f]{1,6}[\\s\\R])))*", + "name": "variable.parameter.less" + }, + { + "include": "#less-variables" + } + ] + } + ] + }, + { + "begin": "(::?)slotted(?=\\s*(\\())", + "beginCaptures": { + "1": { + "name": "punctuation.definition.entity.less" + } + }, + "comment": "::slotted()", + "contentName": "meta.function-call.less", + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.group.end.less" + } + }, + "name": "entity.other.attribute-name.pseudo-element.less", + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.group.begin.less" + } + }, + "end": "(?=\\))", + "name": "meta.group.less", "patterns": [ { "include": "#selectors" @@ -3936,15 +4103,23 @@ "captures": { "1": { "name": "punctuation.definition.entity.less" - }, - "2": { + } + }, + "comment": "defined pseudo-elements", + "match": "(::?)(after|backdrop|before|cue|file-selector-button|first-letter|first-line|grammar-error|marker|placeholder|selection|spelling-error|target-text|view-transition-group|view-transition-image-pair|view-transition-new|view-transition-old|view-transition)\\b", + "name": "entity.other.attribute-name.pseudo-element.less" + }, + { + "captures": { + "1": { "name": "punctuation.definition.entity.less" }, - "3": { - "name": "support.type.vendor-prefix.less" + "2": { + "name": "meta.namespace.vendor-prefix.less" } }, - "match": "(?:(:{1,2})(?:before|after|first-line|first-letter)|(::)(-(?:moz|ms|webkit)-)?(?:(-?(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))(?:[[-\\w][^\\x{00}-\\x{7F}]]|(?:\\\\[ \\t]{1,6}[\\s\\t\\n\\f]?|\\\\[^\\n\\f \\t]))*)))\\b", + "comment": "other possible pseudo-elements", + "match": "(::?)(-\\w+-)(--|(?:-?(?:(?:[a-zA-Z_]|[\\x{00B7}\\x{00C0}-\\x{00D6}\\x{00D8}-\\x{00F6}\\x{00F8}-\\x{037D}\\x{037F}-\\x{1FFF}\\x{200C}\\x{200D}\\x{203F}\\x{2040}\\x{2070}-\\x{218F}\\x{2C00}-\\x{2FEF}\\x{3001}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFFD}\\x{10000}-\\x{EFFFF}])|(?:\\\\(?:\\N|[^0-9A-Fa-f]|[0-9A-Fa-f]{1,6}[\\s\\R]))))(?:(?:[-\\da-zA-Z_]|[\\x{00B7}\\x{00C0}-\\x{00D6}\\x{00D8}-\\x{00F6}\\x{00F8}-\\x{037D}\\x{037F}-\\x{1FFF}\\x{200C}\\x{200D}\\x{203F}\\x{2040}\\x{2070}-\\x{218F}\\x{2C00}-\\x{2FEF}\\x{3001}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFFD}\\x{10000}-\\x{EFFFF}])|(?:\\\\(?:\\N|[^0-9A-Fa-f]|[0-9A-Fa-f]{1,6}[\\s\\R])))*)\\b", "name": "entity.other.attribute-name.pseudo-element.less" } ] @@ -4002,15 +4177,6 @@ } ] }, - "resolution-type": { - "captures": { - "1": { - "name": "keyword.other.unit.less" - } - }, - "match": "(?i:[-+]?(?:(?:\\d*\\.\\d+(?:[eE](?:[-+]?\\d+))*)|(?:[-+]?\\d+))(dpi|dpcm|dppx))\\b", - "name": "constant.numeric.less" - }, "rule-list": { "patterns": [ { @@ -4056,17 +4222,81 @@ "include": "#less-variable-assignment" }, { - "include": "#less-variable-interpolation" + "begin": "(?=[-\\w]*?@\\{.*\\}[-\\w]*?\\s*:[^;{(]*(?=[;})]))", + "end": "(?=\\s*(;)|(?=[})]))", + "patterns": [ + { + "begin": "(?=[^\\s:])", + "end": "(?=(((\\+_?)?):)[\\s\\t]*)", + "name": "support.type.property-name.less", + "patterns": [ + { + "include": "#less-variable-interpolation" + } + ] + }, + { + "begin": "(((\\+_?)?):)(?=[\\s\\t]*)", + "beginCaptures": { + "1": { + "name": "punctuation.separator.key-value.less" + } + }, + "contentName": "support.type.property-name.less", + "end": "(?=\\s*(;)|(?=[})]))", + "patterns": [ + { + "include": "#property-values" + } + ] + } + ] }, { "begin": "(?=[-a-z])", "end": "$|(?![-a-z])", "patterns": [ { - "include": "#vendor-prefix" + "include": "#custom-property-name" }, { - "include": "#custom-property-name" + "begin": "(-[\\w-]+?-)((?:(?:[a-zA-Z_]|[\\x{00B7}\\x{00C0}-\\x{00D6}\\x{00D8}-\\x{00F6}\\x{00F8}-\\x{037D}\\x{037F}-\\x{1FFF}\\x{200C}\\x{200D}\\x{203F}\\x{2040}\\x{2070}-\\x{218F}\\x{2C00}-\\x{2FEF}\\x{3001}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFFD}\\x{10000}-\\x{EFFFF}])|(?:\\\\(?:\\N|[^0-9A-Fa-f]|[0-9A-Fa-f]{1,6}[\\s\\R])))(?:(?:[-\\da-zA-Z_]|[\\x{00B7}\\x{00C0}-\\x{00D6}\\x{00D8}-\\x{00F6}\\x{00F8}-\\x{037D}\\x{037F}-\\x{1FFF}\\x{200C}\\x{200D}\\x{203F}\\x{2040}\\x{2070}-\\x{218F}\\x{2C00}-\\x{2FEF}\\x{3001}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFFD}\\x{10000}-\\x{EFFFF}])|(?:\\\\(?:\\N|[^0-9A-Fa-f]|[0-9A-Fa-f]{1,6}[\\s\\R])))*)\\b", + "beginCaptures": { + "0": { + "name": "support.type.property-name.less" + }, + "1": { + "name": "meta.namespace.vendor-prefix.less" + } + }, + "comment": "vendor-prefixed properties", + "end": "\\s*(;)|(?=[})])", + "endCaptures": { + "1": { + "name": "punctuation.terminator.rule.less" + } + }, + "patterns": [ + { + "begin": "(((\\+_?)?):)(?=[\\s\\t]*)", + "beginCaptures": { + "1": { + "name": "punctuation.separator.key-value.less" + } + }, + "contentName": "meta.property-value.less", + "end": "(?=\\s*(;)|(?=[})]))", + "patterns": [ + { + "include": "#property-values" + }, + { + "match": "[\\w-]+", + "name": "support.constant.property-value.less" + } + ] + } + ] }, { "include": "#filter-function" @@ -4425,7 +4655,49 @@ ] }, { - "match": "\\b(accent-height|align-content|align-items|align-self|alignment-baseline|all|animation-timing-function|animation-range-start|animation-range-end|animation-range|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation-composition|animation|appearance|ascent|azimuth|backface-visibility|background-size|background-repeat-y|background-repeat-x|background-repeat|background-position-y|background-position-x|background-position|background-origin|background-image|background-color|background-clip|background-blend-mode|background-attachment|background|baseline-shift|begin|bias|blend-mode|border-top-left-radius|border-top-right-radius|border-bottom-left-radius|border-bottom-right-radius|border-end-end-radius|border-end-start-radius|border-start-end-radius|border-start-start-radius|border-block-start-color|border-block-start-style|border-block-start-width|border-block-start|border-block-end-color|border-block-end-style|border-block-end-width|border-block-end|border-block-color|border-block-style|border-block-width|border-block|border-inline-start-color|border-inline-start-style|border-inline-start-width|border-inline-start|border-inline-end-color|border-inline-end-style|border-inline-end-width|border-inline-end|border-inline-color|border-inline-style|border-inline-width|border-inline|border-top-color|border-top-style|border-top-width|border-top|border-right-color|border-right-style|border-right-width|border-right|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-left-color|border-left-style|border-left-width|border-left|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-image|border-color|border-style|border-width|border-radius|border-collapse|border-spacing|border|bottom|box-(align|decoration-break|direction|flex|ordinal-group|orient|pack|shadow|sizing)|break-(after|before|inside)|caption-side|clear|clip-path|clip-rule|clip|color(-(interpolation(-filters)?|profile|rendering))?|columns|column-(break-before|count|fill|gap|(rule(-(color|style|width))?)|span|width)|contain(-intrinsic-((((block|inline)-)?size)|height|width))?|content|counter-(increment|reset)|cursor|(c|d|f)(x|y)|direction|display|divisor|dominant-baseline|dur|elevation|empty-cells|enable-background|end|fallback|fill(-(opacity|rule))?|filter|flex(-(align|basis|direction|flow|grow|item-align|line-pack|negative|order|pack|positive|preferred-size|shrink|wrap))?|float|flood-(color|opacity)|font-display|font-family|font-feature-settings|font-kerning|font-language-override|font-size(-adjust)?|font-smoothing|font-stretch|font-style|font-synthesis|font-variant(-(alternates|caps|east-asian|ligatures|numeric|position))?|font-weight|font|fr|((column|row)-)?gap|glyph-orientation-(horizontal|vertical)|grid-(area|gap)|grid-auto-(columns|flow|rows)|grid-(column|row)(-(end|gap|start))?|grid-template(-(areas|columns|rows))?|height|hyphens|image-(orientation|rendering|resolution)|inset(-(block|inline))?(-(start|end))?|isolation|justify-content|justify-items|justify-self|kerning|left|letter-spacing|lighting-color|line-(box-contain|break|clamp|height)|list-style(-(image|position|type))?|(margin|padding)(-(bottom|left|right|top)|(-(block|inline)?(-(end|start))?))?|marker(-(end|mid|start))?|mask(-(clip||composite|image|origin|position|repeat|size|type))?|(max|min)-(height|width)|mix-blend-mode|nbsp-mode|negative|object-(fit|position)|opacity|operator|order|orphans|outline(-(color|offset|style|width))?|overflow(-((inline|block)|scrolling|wrap|x|y))?|overscroll-behavior(-block|-(inline|x|y))?|pad(ding(-(bottom|left|right|top))?)?|page(-break-(after|before|inside))?|paint-order|pause(-(after|before))?|perspective(-origin(-(x|y))?)?|pitch(-range)?|place-content|place-self|pointer-events|position|prefix|quotes|range|resize|right|rotate|scale|scroll-behavior|shape-(image-threshold|margin|outside|rendering)|size|speak(-as)?|src|stop-(color|opacity)|stroke(-(dash(array|offset)|line(cap|join)|miterlimit|opacity|width))?|suffix|symbols|system|tab-size|table-layout|tap-highlight-color|text-align(-last)?|text-decoration(-(color|line|style))?|text-emphasis(-(color|position|style))?|text-(anchor|fill-color|height|indent|justify|orientation|overflow|rendering|size-adjust|shadow|transform|underline-position|wrap)|top|touch-action|transform(-origin(-(x|y))?)|transform(-style)?|transition(-(delay|duration|property|timing-function))?|translate|unicode-(bidi|range)|user-(drag|select)|vertical-align|visibility|white-space(-collapse)?|widows|width|will-change|word-(break|spacing|wrap)|writing-mode|z-index|zoom)\\b", + "begin": "\\bcontainer(?:-name)?(?=\\s*?:)", + "end": "\\s*(;)|(?=[})])", + "endCaptures": { + "1": { + "name": "punctuation.terminator.rule.less" + } + }, + "name": "support.type.property-name.less", + "patterns": [ + { + "begin": "(((\\+_?)?):)(?=[\\s\\t]*)", + "beginCaptures": { + "1": { + "name": "punctuation.separator.key-value.less" + } + }, + "contentName": "meta.property-value.less", + "end": "(?=\\s*(;)|(?=[})]))", + "patterns": [ + { + "match": "\\bdefault\\b", + "name": "invalid.illegal.property-value.less" + }, + { + "include": "#global-property-values" + }, + { + "include": "#custom-property-name" + }, + { + "contentName": "variable.other.constant.container-name.less", + "match": "--|(?:-?(?:(?:[a-zA-Z_]|[\\x{00B7}\\x{00C0}-\\x{00D6}\\x{00D8}-\\x{00F6}\\x{00F8}-\\x{037D}\\x{037F}-\\x{1FFF}\\x{200C}\\x{200D}\\x{203F}\\x{2040}\\x{2070}-\\x{218F}\\x{2C00}-\\x{2FEF}\\x{3001}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFFD}\\x{10000}-\\x{EFFFF}])|(?:\\\\(?:\\N|[^0-9A-Fa-f]|[0-9A-Fa-f]{1,6}[\\s\\R]))))(?:(?:[-\\da-zA-Z_]|[\\x{00B7}\\x{00C0}-\\x{00D6}\\x{00D8}-\\x{00F6}\\x{00F8}-\\x{037D}\\x{037F}-\\x{1FFF}\\x{200C}\\x{200D}\\x{203F}\\x{2040}\\x{2070}-\\x{218F}\\x{2C00}-\\x{2FEF}\\x{3001}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFFD}\\x{10000}-\\x{EFFFF}])|(?:\\\\(?:\\N|[^0-9A-Fa-f]|[0-9A-Fa-f]{1,6}[\\s\\R])))*", + "name": "support.constant.property-value.less" + }, + { + "include": "#property-values" + } + ] + } + ] + }, + { + "match": "\\b(accent-height|align-content|align-items|align-self|alignment-baseline|all|animation-timing-function|animation-range-start|animation-range-end|animation-range|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation-composition|animation|appearance|ascent|aspect-ratio|azimuth|backface-visibility|background-size|background-repeat-y|background-repeat-x|background-repeat|background-position-y|background-position-x|background-position|background-origin|background-image|background-color|background-clip|background-blend-mode|background-attachment|background|baseline-shift|begin|bias|blend-mode|border-top-left-radius|border-top-right-radius|border-bottom-left-radius|border-bottom-right-radius|border-end-end-radius|border-end-start-radius|border-start-end-radius|border-start-start-radius|border-block-start-color|border-block-start-style|border-block-start-width|border-block-start|border-block-end-color|border-block-end-style|border-block-end-width|border-block-end|border-block-color|border-block-style|border-block-width|border-block|border-inline-start-color|border-inline-start-style|border-inline-start-width|border-inline-start|border-inline-end-color|border-inline-end-style|border-inline-end-width|border-inline-end|border-inline-color|border-inline-style|border-inline-width|border-inline|border-top-color|border-top-style|border-top-width|border-top|border-right-color|border-right-style|border-right-width|border-right|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-left-color|border-left-style|border-left-width|border-left|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-image|border-color|border-style|border-width|border-radius|border-collapse|border-spacing|border|bottom|box-(align|decoration-break|direction|flex|ordinal-group|orient|pack|shadow|sizing)|break-(after|before|inside)|caption-side|clear|clip-path|clip-rule|clip|color(-(interpolation(-filters)?|profile|rendering))?|columns|column-(break-before|count|fill|gap|(rule(-(color|style|width))?)|span|width)|container-name|container-type|container|contain-intrinsic-block-size|contain-intrinsic-inline-size|contain-intrinsic-height|contain-intrinsic-size|contain-intrinsic-width|contain|content|counter-(increment|reset)|cursor|[cdf][xy]|direction|display|divisor|dominant-baseline|dur|elevation|empty-cells|enable-background|end|fallback|fill(-(opacity|rule))?|filter|flex(-(align|basis|direction|flow|grow|item-align|line-pack|negative|order|pack|positive|preferred-size|shrink|wrap))?|float|flood-(color|opacity)|font-display|font-family|font-feature-settings|font-kerning|font-language-override|font-size(-adjust)?|font-smoothing|font-stretch|font-style|font-synthesis|font-variant(-(alternates|caps|east-asian|ligatures|numeric|position))?|font-weight|font|fr|((column|row)-)?gap|glyph-orientation-(horizontal|vertical)|grid-(area|gap)|grid-auto-(columns|flow|rows)|grid-(column|row)(-(end|gap|start))?|grid-template(-(areas|columns|rows))?|grid|height|hyphens|image-(orientation|rendering|resolution)|inset(-(block|inline))?(-(start|end))?|isolation|justify-content|justify-items|justify-self|kerning|left|letter-spacing|lighting-color|line-(box-contain|break|clamp|height)|list-style(-(image|position|type))?|(margin|padding)(-(bottom|left|right|top)|(-(block|inline)?(-(end|start))?))?|marker(-(end|mid|start))?|mask(-(clip||composite|image|origin|position|repeat|size|type))?|(max|min)-(height|width)|mix-blend-mode|nbsp-mode|negative|object-(fit|position)|opacity|operator|order|orphans|outline(-(color|offset|style|width))?|overflow(-((inline|block)|scrolling|wrap|x|y))?|overscroll-behavior(-block|-(inline|x|y))?|pad(ding(-(bottom|left|right|top))?)?|page(-break-(after|before|inside))?|paint-order|pause(-(after|before))?|perspective(-origin(-(x|y))?)?|pitch(-range)?|place-content|place-self|pointer-events|position|prefix|quotes|range|resize|right|rotate|scale|scroll-behavior|shape-(image-threshold|margin|outside|rendering)|size|speak(-as)?|src|stop-(color|opacity)|stroke(-(dash(array|offset)|line(cap|join)|miterlimit|opacity|width))?|suffix|symbols|system|tab-size|table-layout|tap-highlight-color|text-align(-last)?|text-decoration(-(color|line|style))?|text-emphasis(-(color|position|style))?|text-(anchor|fill-color|height|indent|justify|orientation|overflow|rendering|size-adjust|shadow|transform|underline-position|wrap)|top|touch-action|transform(-origin(-(x|y))?)|transform(-style)?|transition(-(delay|duration|property|timing-function))?|translate|unicode-(bidi|range)|user-(drag|select)|vertical-align|visibility|white-space(-collapse)?|widows|width|will-change|word-(break|spacing|wrap)|writing-mode|z-index|zoom)\\b", "name": "support.type.property-name.less" }, { @@ -4593,10 +4865,7 @@ ] }, { - "include": "#pseudo-elements" - }, - { - "include": "#pseudo-classes" + "include": "#pseudo-selectors" }, { "include": "#less-extend" @@ -4615,12 +4884,17 @@ }, { "begin": "\\[", - "captures": { + "beginCaptures": { "0": { - "name": "punctuation.definition.entity.less" + "name": "punctuation.section.braces.begin.less" } }, "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.section.braces.end.less" + } + }, "name": "meta.attribute-selector.less", "patterns": [ { @@ -4635,7 +4909,7 @@ }, { "begin": "\\s*([~*|^$]?=)\\s*", - "captures": { + "beginCaptures": { "1": { "name": "keyword.operator.attribute-selector.less" } @@ -4892,6 +5166,37 @@ } ] }, + "style-function": { + "begin": "\\b(style)(?=\\()", + "beginCaptures": { + "0": { + "name": "support.function.style.less" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.group.end.less" + } + }, + "name": "meta.function-call.less", + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.group.begin.less" + } + }, + "end": "(?=\\))", + "patterns": [ + { + "include": "#rule-list-body" + } + ] + } + ] + }, "symbols-function": { "begin": "\\b(symbols)(?=\\()", "beginCaptures": { @@ -5394,10 +5699,6 @@ } ] }, - "vendor-prefix": { - "match": "-(?:webkit|moz(-osx)?|ms|o)-", - "name": "support.type.vendor-prefix.less" - }, "view-function": { "begin": "\\b(view)(?=\\()", "beginCaptures": { @@ -5427,10 +5728,10 @@ "name": "support.constant.property-value.less" }, { - "include": "#length-type" + "include": "#percentage-type" }, { - "include": "#percentage-type" + "include": "#length-type" }, { "include": "#less-variables" diff --git a/packages/tm-grammars/grammars/rust.json b/packages/tm-grammars/grammars/rust.json index 0ffcbce..6f9c60e 100644 --- a/packages/tm-grammars/grammars/rust.json +++ b/packages/tm-grammars/grammars/rust.json @@ -475,10 +475,13 @@ } }, "comment": "function definition", - "end": "\\{|;", + "end": "(\\{)|(;)", "endCaptures": { - "0": { + "1": { "name": "punctuation.brackets.curly.rust" + }, + "2": { + "name": "punctuation.semi.rust" } }, "name": "meta.function.definition.rust", @@ -840,7 +843,7 @@ }, { "comment": "dashrocket, skinny arrow", - "match": "->", + "match": "->|<-", "name": "keyword.operator.arrow.skinny.rust" }, { diff --git a/packages/tm-grammars/index.js b/packages/tm-grammars/index.js index 60962ce..51ebf6c 100644 --- a/packages/tm-grammars/index.js +++ b/packages/tm-grammars/index.js @@ -645,18 +645,18 @@ export const grammars = [ source: 'https://github.com/Pure-D/code-d/blob/466ac04dcc1f6d3fea50ef5ae7a920a121efd09c/syntaxes/d.json', }, { - byteSize: 7090, + byteSize: 7123, categories: [ 'general', ], displayName: 'Dart', - lastUpdate: '2024-04-26T11:52:52Z', + lastUpdate: '2024-08-30T20:03:00Z', license: 'MIT', licenseUrl: 'https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt', name: 'dart', scopeName: 'source.dart', - sha: '5c213a1e84928c7a7d11ca5b282ca602d40c1352', - source: 'https://github.com/microsoft/vscode/blob/5c213a1e84928c7a7d11ca5b282ca602d40c1352/extensions/dart/syntaxes/dart.tmLanguage.json', + sha: '03dc55030b3b2b5c4779d4ac1e2e46cd1f5a6b7c', + source: 'https://github.com/microsoft/vscode/blob/03dc55030b3b2b5c4779d4ac1e2e46cd1f5a6b7c/extensions/dart/syntaxes/dart.tmLanguage.json', }, { byteSize: 5397, @@ -904,7 +904,7 @@ export const grammars = [ 'f#', 'fs', ], - byteSize: 24579, + byteSize: 24607, categories: [ 'general', ], @@ -912,13 +912,13 @@ export const grammars = [ embedded: [ 'markdown', ], - lastUpdate: '2024-07-29T09:33:03Z', + lastUpdate: '2024-08-30T20:03:00Z', license: 'MIT', licenseUrl: 'https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt', name: 'fsharp', scopeName: 'source.fsharp', - sha: '9473445f7d3dcb5c579f42ece8b6c18c43c63ed3', - source: 'https://github.com/microsoft/vscode/blob/9473445f7d3dcb5c579f42ece8b6c18c43c63ed3/extensions/fsharp/syntaxes/fsharp.tmLanguage.json', + sha: '03dc55030b3b2b5c4779d4ac1e2e46cd1f5a6b7c', + source: 'https://github.com/microsoft/vscode/blob/03dc55030b3b2b5c4779d4ac1e2e46cd1f5a6b7c/extensions/fsharp/syntaxes/fsharp.tmLanguage.json', }, { byteSize: 4996, @@ -1088,18 +1088,18 @@ export const grammars = [ source: 'https://github.com/MarioSchwalbe/vscode-gnuplot/blob/c62c1a61c9b6b4658b43d76c397dc2ad43523b6a/syntaxes/gnuplot.tmLanguage', }, { - byteSize: 46530, + byteSize: 46123, categories: [ 'general', ], displayName: 'Go', - lastUpdate: '2024-06-28T09:56:38Z', + lastUpdate: '2024-08-30T20:03:00Z', license: 'MIT', licenseUrl: 'https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt', name: 'go', scopeName: 'source.go', - sha: 'ed4e6eda599f37bac9a11952403a6e63fd4f5a4d', - source: 'https://github.com/microsoft/vscode/blob/ed4e6eda599f37bac9a11952403a6e63fd4f5a4d/extensions/go/syntaxes/go.tmLanguage.json', + sha: '03dc55030b3b2b5c4779d4ac1e2e46cd1f5a6b7c', + source: 'https://github.com/microsoft/vscode/blob/03dc55030b3b2b5c4779d4ac1e2e46cd1f5a6b7c/extensions/go/syntaxes/go.tmLanguage.json', }, { aliases: [ @@ -1668,18 +1668,18 @@ export const grammars = [ source: 'https://github.com/leanprover/vscode-lean4/blob/2255bc20c9d28d868d04fb91428652a95cc87a92/vscode-lean4/syntaxes/lean4.json', }, { - byteSize: 89651, + byteSize: 98892, categories: [ 'web', ], displayName: 'Less', - lastUpdate: '2024-07-29T09:33:03Z', + lastUpdate: '2024-08-30T20:03:00Z', license: 'MIT', licenseUrl: 'https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt', name: 'less', scopeName: 'source.css.less', - sha: '9473445f7d3dcb5c579f42ece8b6c18c43c63ed3', - source: 'https://github.com/microsoft/vscode/blob/9473445f7d3dcb5c579f42ece8b6c18c43c63ed3/extensions/less/syntaxes/less.tmLanguage.json', + sha: '03dc55030b3b2b5c4779d4ac1e2e46cd1f5a6b7c', + source: 'https://github.com/microsoft/vscode/blob/03dc55030b3b2b5c4779d4ac1e2e46cd1f5a6b7c/extensions/less/syntaxes/less.tmLanguage.json', }, { byteSize: 15676, @@ -2552,18 +2552,18 @@ export const grammars = [ aliases: [ 'rs', ], - byteSize: 17175, + byteSize: 17219, categories: [ 'general', ], displayName: 'Rust', - lastUpdate: '2024-04-09T10:20:39Z', + lastUpdate: '2024-08-30T20:03:00Z', license: 'MIT', licenseUrl: 'https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt', name: 'rust', scopeName: 'source.rust', - sha: 'b557947e50a068bdcc927ffd31ee555dbb232558', - source: 'https://github.com/microsoft/vscode/blob/b557947e50a068bdcc927ffd31ee555dbb232558/extensions/rust/syntaxes/rust.tmLanguage.json', + sha: '03dc55030b3b2b5c4779d4ac1e2e46cd1f5a6b7c', + source: 'https://github.com/microsoft/vscode/blob/03dc55030b3b2b5c4779d4ac1e2e46cd1f5a6b7c/extensions/rust/syntaxes/rust.tmLanguage.json', }, { byteSize: 9527, diff --git a/packages/tm-grammars/package.json b/packages/tm-grammars/package.json index ac6348a..f210347 100644 --- a/packages/tm-grammars/package.json +++ b/packages/tm-grammars/package.json @@ -1,7 +1,7 @@ { "name": "tm-grammars", "type": "module", - "version": "1.17.9", + "version": "1.17.10", "description": "Collecton of TextMate grammars in JSON", "author": "Anthony Fu ", "license": "MIT",