diff options
| author | ObserverOfTime <chronobserver@disroot.org> | 2024-02-23 17:21:26 +0200 |
|---|---|---|
| committer | ObserverOfTime <chronobserver@disroot.org> | 2024-02-23 17:37:22 +0200 |
| commit | e105b5e67df1a9bbd9d35a9aef4d40d0119d708d (patch) | |
| tree | 99c5b26c377bcc9da0d11a19e1090ad8bbcb5cb3 | |
| parent | fix(fidl): remove requires_generate_from_grammar (diff) | |
| download | nvim-treesitter-e105b5e67df1a9bbd9d35a9aef4d40d0119d708d.tar nvim-treesitter-e105b5e67df1a9bbd9d35a9aef4d40d0119d708d.tar.gz nvim-treesitter-e105b5e67df1a9bbd9d35a9aef4d40d0119d708d.tar.bz2 nvim-treesitter-e105b5e67df1a9bbd9d35a9aef4d40d0119d708d.tar.lz nvim-treesitter-e105b5e67df1a9bbd9d35a9aef4d40d0119d708d.tar.xz nvim-treesitter-e105b5e67df1a9bbd9d35a9aef4d40d0119d708d.tar.zst nvim-treesitter-e105b5e67df1a9bbd9d35a9aef4d40d0119d708d.zip | |
feat(properties): update parser & queries
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | lockfile.json | 2 | ||||
| -rw-r--r-- | lua/nvim-treesitter/parsers.lua | 4 | ||||
| -rw-r--r-- | queries/properties/highlights.scm | 16 |
4 files changed, 15 insertions, 9 deletions
@@ -340,7 +340,7 @@ We are looking for maintainers to add more parsers and to write query files for - [x] [printf](https://github.com/ObserverOfTime/tree-sitter-printf) (maintained by @ObserverOfTime) - [x] [prisma](https://github.com/victorhqc/tree-sitter-prisma) (maintained by @elianiva) - [x] [promql](https://github.com/MichaHoffmann/tree-sitter-promql) (maintained by @MichaHoffmann) -- [x] [properties](https://github.com/ObserverOfTime/tree-sitter-properties) (maintained by @ObserverOfTime) +- [x] [properties](https://github.com/tree-sitter-grammars/tree-sitter-properties) (maintained by @ObserverOfTime) - [x] [proto](https://github.com/treywood/tree-sitter-proto) (maintained by @treywood) - [x] [prql](https://github.com/PRQL/tree-sitter-prql) (maintained by @matthias-Q) - [x] [psv](https://github.com/amaanq/tree-sitter-csv) (maintained by @amaanq) diff --git a/lockfile.json b/lockfile.json index b6bc19876..9adbcbe67 100644 --- a/lockfile.json +++ b/lockfile.json @@ -501,7 +501,7 @@ "revision": "77625d78eebc3ffc44d114a07b2f348dff3061b0" }, "properties": { - "revision": "74e5d3c63d0da17c0800b3cf9090b24637ef6b59" + "revision": "189b3cc18d36871c27ebb0adcf0cddd123b0cbba" }, "proto": { "revision": "e9f6b43f6844bd2189b50a422d4e2094313f6aa3" diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 6209ccc84..59cef4d53 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -1484,8 +1484,8 @@ list.promql = { list.properties = { install_info = { - url = "https://github.com/ObserverOfTime/tree-sitter-properties", - files = { "src/parser.c" }, + url = "https://github.com/tree-sitter-grammars/tree-sitter-properties", + files = { "src/parser.c", "src/scanner.c" }, }, filetype = "jproperties", maintainers = { "@ObserverOfTime" }, diff --git a/queries/properties/highlights.scm b/queries/properties/highlights.scm index d819e20a5..b9390be8c 100644 --- a/queries/properties/highlights.scm +++ b/queries/properties/highlights.scm @@ -13,7 +13,17 @@ ((value) @number (#lua-match? @number "^%d+$")) -(index) @number +((index) @number + (#lua-match? @number "^%d+$")) + +((substitution + (key) @constant) + (#lua-match? @constant "^[A-Z_][A-Z0-9_]*$")) + +(substitution + (key) @function + "::" @punctuation.special + (secret) @constant.macro) (property [ @@ -38,7 +48,3 @@ "." "\\" ] @punctuation.delimiter - -((substitution - (key) @constant) - (#lua-match? @constant "^[A-Z_][A-Z0-9_]*$")) |
