diff options
| author | Amaan Qureshi <amaanq12@gmail.com> | 2023-01-22 05:29:50 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-22 12:29:50 +0200 |
| commit | b300d903b0c050bedd75d029604021f6d37ce59c (patch) | |
| tree | f5cb267a6a83f5864a291f29441f78b8dbf84703 | |
| parent | Update parsers: clojure, scala, thrift (diff) | |
| download | nvim-treesitter-b300d903b0c050bedd75d029604021f6d37ce59c.tar nvim-treesitter-b300d903b0c050bedd75d029604021f6d37ce59c.tar.gz nvim-treesitter-b300d903b0c050bedd75d029604021f6d37ce59c.tar.bz2 nvim-treesitter-b300d903b0c050bedd75d029604021f6d37ce59c.tar.lz nvim-treesitter-b300d903b0c050bedd75d029604021f6d37ce59c.tar.xz nvim-treesitter-b300d903b0c050bedd75d029604021f6d37ce59c.tar.zst nvim-treesitter-b300d903b0c050bedd75d029604021f6d37ce59c.zip | |
feat(thrift): use better queries, namely for idents (#4197)
| -rw-r--r-- | lockfile.json | 2 | ||||
| -rw-r--r-- | lua/nvim-treesitter/parsers.lua | 1 | ||||
| -rw-r--r-- | queries/thrift/highlights.scm | 25 |
3 files changed, 23 insertions, 5 deletions
diff --git a/lockfile.json b/lockfile.json index ac3fafb20..5ab72e4e8 100644 --- a/lockfile.json +++ b/lockfile.json @@ -390,7 +390,7 @@ "revision": "0ff887f2a60a147452d52db060de6b42f42f1441" }, "thrift": { - "revision": "f1029a93e59cf61df759d54d56145ba65c3a3040" + "revision": "999a27d87b8f90a74306d4e79c5e22db3ab61633" }, "tiger": { "revision": "a233ebe360a73a92c50978e5c4e9e471bc59ff42" diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 39d989e0b..e4d1da4d9 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -1250,7 +1250,6 @@ list.thrift = { files = { "src/parser.c" }, }, maintainers = { "@amaanq", "@duskmoon314" }, - experimental = true, } list.tiger = { diff --git a/queries/thrift/highlights.scm b/queries/thrift/highlights.scm index f585ec08a..d3795aef8 100644 --- a/queries/thrift/highlights.scm +++ b/queries/thrift/highlights.scm @@ -27,16 +27,31 @@ ; Fields -(field) @field +(field_identifier) @field ; Parameters -(parameter) @parameter +(param_identifier) @parameter ; Variables (identifier) @variable +; Constants + +(const_identifier) @constant +(enum_member) @constant + +; Types + +(enum_identifier) @type +(field_type) @type +(type_identifier) @type + +; Attributes + +(annotation_identifier) @attribute + ; Operators [ @@ -75,7 +90,8 @@ "void" ] @keyword -; Deprecated +; Deprecated Keywords + [ "async" "byte" @@ -110,6 +126,7 @@ (boolean) @boolean (typedef_definition) @type.definition +(namespace_definition) @type.definition [ "const" @@ -129,6 +146,8 @@ ["[" "]"] @punctuation.bracket +["<" ">"] @punctuation.bracket + [ ";" "," |
