diff --git a/packages/tm-grammars/README.md b/packages/tm-grammars/README.md index 6c503db..45a8ed3 100644 --- a/packages/tm-grammars/README.md +++ b/packages/tm-grammars/README.md @@ -106,7 +106,7 @@ import { grammars } from 'tm-grammars' | `html-derivative` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/cfc2a2212de9ea10943af58ebd1817a5ad196463/extensions/html/syntaxes/html-derivative.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | `html` | 777.00 B | | `http` | | [Huachao/vscode-restclient](https://github.com/Huachao/vscode-restclient/blob/a89f8bce1b5e3d5bd955f10916b0c101e20431d3/syntaxes/http.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/Huachao/vscode-restclient/master/LICENSE) | `shellscript` `json` `xml` `graphql` | 3.95 kB | | `hxml` | | [vshaxe/haxe-TmLanguage](https://github.com/vshaxe/haxe-TmLanguage/blob/cf8117cb69876af5fbac537860ffc73928fe2571/hxml.YAML-tmLanguage) | [MIT](https://raw.githubusercontent.com/vshaxe/haxe-TmLanguage/master/LICENSE.md) | `haxe` | 1.63 kB | -| `hy` | | [hylang/vscode-hy](https://github.com/hylang/vscode-hy/blob/cc97e60245af508c5c81fe4cda51ac6bc9083082/syntaxes/hy.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/hylang/vscode-hy/master/LICENSE.md) | | 3.03 kB | +| `hy` | | [hylang/vscode-hy](https://github.com/hylang/vscode-hy/blob/056971d04248b485da486b15e12f4155263bad18/syntaxes/hy.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/hylang/vscode-hy/master/LICENSE.md) | | 2.30 kB | | `imba` | | [imba/imba](https://github.com/imba/imba/blob/980c223d8da94939499ad8a92c4e31a6edd4fd54/packages/vscode-imba/syntaxes/imba.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/imba/imba/master/LICENSE) | `typescript` | 47.76 kB | | `ini` | `properties` | [microsoft/vscode](https://github.com/microsoft/vscode/blob/8fdf170a0850c1cc027382f31650aaf300d3ae2a/extensions/ini/syntaxes/ini.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | 1.38 kB | | `java` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/3c86ede5f554f6e196c832394e126b291a1de606/extensions/java/syntaxes/java.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | 25.84 kB | diff --git a/packages/tm-grammars/grammars/hy.json b/packages/tm-grammars/grammars/hy.json index b4b2d0f..abac37f 100644 --- a/packages/tm-grammars/grammars/hy.json +++ b/packages/tm-grammars/grammars/hy.json @@ -27,11 +27,26 @@ { "include": "#keysym" }, + { + "include": "#builtin" + }, { "include": "#symbol" } ] }, + "builtin": { + "patterns": [ + { + "match": "\\b(abs|all|any|ascii|bin|breakpoint|callable|chr|compile|delattr|dir|divmod|eval|exec|format|getattr|globals|hasattr|hash|hex|id|input|isinstance|issubclass|iter|aiter|len|locals|max|min|next|anext|oct|ord|pow|print|repr|round|setattr|sorted|sum|vars|False|None|True|NotImplemented|bool|memoryview|bytearray|bytes|classmethod|complex|dict|enumerate|filter|float|frozenset|property|int|list|map|object|range|reversed|set|slice|staticmethod|str|super|tuple|type|zip|open|quit|exit|copyright|credits|help)[\\s)]", + "name": "storage.builtin.hy" + }, + { + "match": "(?<=\\(\\s*)\\.\\.\\.[\\s)]", + "name": "storage.builtin.dots.hy" + } + ] + }, "comment": { "patterns": [ { @@ -55,15 +70,19 @@ "keywords": { "patterns": [ { - "match": "\\b(\\.|->|->>|and|match|let|await|annotate|as->|as-model|assert|assoc|break|chainc|comment|cond|continue|do|doc|#doc|([dgls])?for|set[vx]|defclass|defmain|defmacro|defmacro\\/g!|defmacro!|deftag|del|doto|eval-and-compile|eval-when-compile|first|gensym|get|global|if|if\\*|if-not|import|(de)?fn(\\/a)?|last|nonlocal|not(\\?|-in)?|or|print|(quasi)?quote|require|rest|return|cut|raise|try|unless|unpack-iterable|unpack-mapping|unquote|unquote-splice|when|while|with(\\/a)?|with-decorator|with-gensyms|xor|yield(-from)?|butlast|coll\\?|comp|complement|constantly|dec|disassemble|empty\\?|eval|every\\?|exec|float\\?|fraction|even\\?|identity|inc|instance\\?|integer\\?|interleave|interpose|iterable\\?|iterator\\?|juxt|keyword|keyword\\?|macroexpand(-1)?|mangle|merge-with|name|neg\\?|none\\?|nth|numeric\\?|odd\\?|partition|pos\\?|second|some|string\\?|symbol\\?|zero\\?|cycle|distinct|drop|drop-last|drop-while|filter|flatten|iterate|read|read-str|remove|repeat|repeatedly|take|take-nth|take-while|unmangle|False|None|True|as|in|is|py(s)?|lambda|nonlocal|not|pass|abs|all|any|ascii|bin|bool|bytearray|bytes|callable|chr|classmethod|compile|complex|delattr|dict|dir|divmod|enumerate|eval|exec|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|isinstance|issubclass|iter|len|list|locals|map|max|memoryview|min|next|object|oct|open|ord|pow|print|property|range|repr(-register)?|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|vars|zip|__import__|abs|acos|angle|asin|assoc|assq|assv|atan|ceiling|cos|floor|round|sin|sqrt|tan|(?:real|imag)-part|numerator|denominatormodulo|exp|expt|remainder|quotient|lcm|call-with-(?:input|output)-file|(?:close|current)-(?:input|output)-port|with-(?:input|output)-from-file|open-(?:input|output)-file|char-(?:downcase|upcase|ready)|make-(?:polar|promise|rectangular|string|vector)|string(?:-(?:append|copy|length|ref))|vector(?:-length|-ref))[\\s)]", + "match": "\\b(and|await|match|let|annotate|assert|break|chainc|cond|continue|deftype|do|except\\*?|finally|else|defreader|([dgls])?for|set[vx]|defclass|defmacro|del|export|eval-and-compile|eval-when-compile|get|global|if|import|(de)?fn|nonlocal|not-in|or|(quasi)?quote|require|return|cut|raise|try|unpack-iterable|unpack-mapping|unquote|unquote-splice|when|while|with|yield|local-macros|in|is|py(s)?|pragma|nonlocal|(is-)?not)[\\s)]", "name": "keyword.control.hy" + }, + { + "match": "(?<=\\(\\s*)\\.[\\s)]", + "name": "keyword.control.dot.hy" } ] }, "operators": { "patterns": [ { - "match": "(?<=\\()\\s*(\\+=?|\\/+|\\*+|-=?|[!<>]?=|@|%|<<|>>|<|>|&|\\||\\^|~)", + "match": "(?<=\\()\\s*(\\+=?|\\/\\/?=?|\\*\\*?=?|--?=?|[!<>]?=|@=?|%=?|<>?=?|&=?|\\|=?|\\^|~@|~=?|#\\*\\*?)", "name": "keyword.control.hy" } ] diff --git a/packages/tm-grammars/index.js b/packages/tm-grammars/index.js index 3dcc2fc..7133522 100644 --- a/packages/tm-grammars/index.js +++ b/packages/tm-grammars/index.js @@ -1433,19 +1433,19 @@ export const grammars = [ source: 'https://github.com/vshaxe/haxe-TmLanguage/blob/cf8117cb69876af5fbac537860ffc73928fe2571/hxml.YAML-tmLanguage', }, { - byteSize: 3101, + byteSize: 2358, categories: [ 'lisp', ], displayName: 'Hy', - hash: 'zM8oPKwzTh', - lastUpdate: '2023-09-11T00:57:08Z', + hash: 'jcd6VvFgTe', + lastUpdate: '2024-10-05T01:51:45Z', license: 'MIT', licenseUrl: 'https://raw.githubusercontent.com/hylang/vscode-hy/master/LICENSE.md', name: 'hy', scopeName: 'source.hy', - sha: 'cc97e60245af508c5c81fe4cda51ac6bc9083082', - source: 'https://github.com/hylang/vscode-hy/blob/cc97e60245af508c5c81fe4cda51ac6bc9083082/syntaxes/hy.tmLanguage.json', + sha: '056971d04248b485da486b15e12f4155263bad18', + source: 'https://github.com/hylang/vscode-hy/blob/056971d04248b485da486b15e12f4155263bad18/syntaxes/hy.tmLanguage.json', }, { byteSize: 48903, diff --git a/packages/tm-grammars/package.json b/packages/tm-grammars/package.json index 3a1600e..5c2056a 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.28", + "version": "1.18.0", "description": "Collecton of TextMate grammars in JSON", "author": "Anthony Fu ", "license": "MIT", diff --git a/packages/tm-grammars/raw/hy.json b/packages/tm-grammars/raw/hy.json index d5d1d78..a825e47 100644 --- a/packages/tm-grammars/raw/hy.json +++ b/packages/tm-grammars/raw/hy.json @@ -28,11 +28,26 @@ { "include": "#keysym" }, + { + "include": "#builtin" + }, { "include": "#symbol" } ] }, + "builtin": { + "patterns": [ + { + "match": "\\b(abs|all|any|ascii|bin|breakpoint|callable|chr|compile|delattr|dir|divmod|eval|exec|format|getattr|globals|hasattr|hash|hex|id|input|isinstance|issubclass|iter|aiter|len|locals|max|min|next|anext|oct|ord|pow|print|repr|round|setattr|sorted|sum|vars|False|None|True|NotImplemented|bool|memoryview|bytearray|bytes|classmethod|complex|dict|enumerate|filter|float|frozenset|property|int|list|map|object|range|reversed|set|slice|staticmethod|str|super|tuple|type|zip|open|quit|exit|copyright|credits|help)[\\s\\)]", + "name": "storage.builtin.hy" + }, + { + "match": "(?<=\\(\\s*)\\.\\.\\.[\\s\\)]", + "name": "storage.builtin.dots.hy" + } + ] + }, "comment": { "patterns": [ { @@ -56,15 +71,19 @@ "keywords": { "patterns": [ { - "match": "\\b(\\.|->|->>|and|match|let|await|annotate|as->|as-model|assert|assoc|break|chainc|comment|cond|continue|do|doc|#doc|([dgls])?for|set[vx]|defclass|defmain|defmacro|defmacro\\/g!|defmacro!|deftag|del|doto|eval-and-compile|eval-when-compile|first|gensym|get|global|if|if\\*|if-not|import|(de)?fn(\\/a)?|last|nonlocal|not(\\?|-in)?|or|print|(quasi)?quote|require|rest|return|cut|raise|try|unless|unpack-iterable|unpack-mapping|unquote|unquote-splice|when|while|with(\\/a)?|with-decorator|with-gensyms|xor|yield(-from)?|butlast|coll\\?|comp|complement|constantly|dec|disassemble|empty\\?|eval|every\\?|exec|float\\?|fraction|even\\?|identity|inc|instance\\?|integer\\?|interleave|interpose|iterable\\?|iterator\\?|juxt|keyword|keyword\\?|macroexpand(-1)?|mangle|merge-with|name|neg\\?|none\\?|nth|numeric\\?|odd\\?|partition|pos\\?|second|some|string\\?|symbol\\?|zero\\?|cycle|distinct|drop|drop-last|drop-while|filter|flatten|iterate|read|read-str|remove|repeat|repeatedly|take|take-nth|take-while|unmangle|False|None|True|as|in|is|py(s)?|lambda|nonlocal|not|pass|abs|all|any|ascii|bin|bool|bytearray|bytes|callable|chr|classmethod|compile|complex|delattr|dict|dir|divmod|enumerate|eval|exec|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|isinstance|issubclass|iter|len|list|locals|map|max|memoryview|min|next|object|oct|open|ord|pow|print|property|range|repr(-register)?|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|vars|zip|__import__|abs|acos|angle|asin|assoc|assq|assv|atan|ceiling|cos|floor|round|sin|sqrt|tan|(?:real|imag)-part|numerator|denominatormodulo|exp|expt|remainder|quotient|lcm|call-with-(?:input|output)-file|(?:close|current)-(?:input|output)-port|with-(?:input|output)-from-file|open-(?:input|output)-file|char-(?:downcase|upcase|ready)|make-(?:polar|promise|rectangular|string|vector)|string(?:-(?:append|copy|length|ref))|vector(?:-length|-ref))[\\s\\)]", + "match": "\\b(and|await|match|let|annotate|assert|break|chainc|cond|continue|deftype|do|except\\*?|finally|else|defreader|([dgls])?for|set[vx]|defclass|defmacro|del|export|eval-and-compile|eval-when-compile|get|global|if|import|(de)?fn|nonlocal|not-in|or|(quasi)?quote|require|return|cut|raise|try|unpack-iterable|unpack-mapping|unquote|unquote-splice|when|while|with|yield|local-macros|in|is|py(s)?|pragma|nonlocal|(is-)?not)[\\s\\)]", "name": "keyword.control.hy" + }, + { + "match": "(?<=\\(\\s*)\\.[\\s\\)]", + "name": "keyword.control.dot.hy" } ] }, "operators": { "patterns": [ { - "match": "(?<=\\()\\s*(\\+=?|\\/+|\\*+|-=?|[!<>]?=|@|%|<<|>>|<|>|&|\\||\\^|~)", + "match": "(?<=\\()\\s*(\\+=?|\\/\\/?=?|\\*\\*?=?|--?=?|[!<>]?=|@=?|%=?|<>?=?|&=?|\\|=?|\\^|~@|~=?|#\\*\\*?)", "name": "keyword.control.hy" } ]