mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-15 01:40:02 -04:00
feat(thrift): refactor queries for better highlights, fixes bugs where certain ones went past where they should've ended
This commit is contained in:
parent
7bef1d5330
commit
1913ce2fd2
2 changed files with 11 additions and 10 deletions
|
|
@ -390,7 +390,7 @@
|
||||||
"revision": "0ff887f2a60a147452d52db060de6b42f42f1441"
|
"revision": "0ff887f2a60a147452d52db060de6b42f42f1441"
|
||||||
},
|
},
|
||||||
"thrift": {
|
"thrift": {
|
||||||
"revision": "999a27d87b8f90a74306d4e79c5e22db3ab61633"
|
"revision": "b05fca8fa29b9ecaae0cd153ba590e4b7f840819"
|
||||||
},
|
},
|
||||||
"tiger": {
|
"tiger": {
|
||||||
"revision": "a233ebe360a73a92c50978e5c4e9e471bc59ff42"
|
"revision": "a233ebe360a73a92c50978e5c4e9e471bc59ff42"
|
||||||
|
|
|
||||||
|
|
@ -19,11 +19,12 @@
|
||||||
"list"
|
"list"
|
||||||
"map"
|
"map"
|
||||||
"set"
|
"set"
|
||||||
|
"void"
|
||||||
] @type.builtin
|
] @type.builtin
|
||||||
|
|
||||||
; Function
|
; Function
|
||||||
|
|
||||||
(function) @function
|
(function_identifier) @function
|
||||||
|
|
||||||
; Fields
|
; Fields
|
||||||
|
|
||||||
|
|
@ -32,6 +33,7 @@
|
||||||
; Parameters
|
; Parameters
|
||||||
|
|
||||||
(param_identifier) @parameter
|
(param_identifier) @parameter
|
||||||
|
(exception_param_identifier) @parameter
|
||||||
|
|
||||||
; Variables
|
; Variables
|
||||||
|
|
||||||
|
|
@ -45,6 +47,8 @@
|
||||||
; Types
|
; Types
|
||||||
|
|
||||||
(enum_identifier) @type
|
(enum_identifier) @type
|
||||||
|
(exception_identifier) @type
|
||||||
|
(exception_param_type) @type
|
||||||
(field_type) @type
|
(field_type) @type
|
||||||
(type_identifier) @type
|
(type_identifier) @type
|
||||||
|
|
||||||
|
|
@ -64,14 +68,12 @@
|
||||||
; Exceptions
|
; Exceptions
|
||||||
|
|
||||||
[
|
[
|
||||||
(exception)
|
"throws"
|
||||||
(throws)
|
|
||||||
] @exception
|
] @exception
|
||||||
|
|
||||||
; Keywords
|
; Keywords
|
||||||
|
|
||||||
[
|
[
|
||||||
"const"
|
|
||||||
"cpp_include"
|
"cpp_include"
|
||||||
"enum"
|
"enum"
|
||||||
"exception"
|
"exception"
|
||||||
|
|
@ -84,10 +86,8 @@
|
||||||
"senum"
|
"senum"
|
||||||
"service"
|
"service"
|
||||||
"struct"
|
"struct"
|
||||||
"throws"
|
|
||||||
"typedef"
|
"typedef"
|
||||||
"union"
|
"union"
|
||||||
"void"
|
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
; Deprecated Keywords
|
; Deprecated Keywords
|
||||||
|
|
@ -113,7 +113,7 @@
|
||||||
"xsd_optional"
|
"xsd_optional"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
(namespace_scope) @keyword
|
(namespace_scope) @namespace
|
||||||
|
|
||||||
; Literals
|
; Literals
|
||||||
|
|
||||||
|
|
@ -125,9 +125,12 @@
|
||||||
|
|
||||||
(boolean) @boolean
|
(boolean) @boolean
|
||||||
|
|
||||||
|
; Typedefs
|
||||||
(typedef_definition) @type.definition
|
(typedef_definition) @type.definition
|
||||||
(namespace_definition) @type.definition
|
(namespace_definition) @type.definition
|
||||||
|
|
||||||
|
; Misc
|
||||||
|
|
||||||
[
|
[
|
||||||
"const"
|
"const"
|
||||||
] @type.qualifier
|
] @type.qualifier
|
||||||
|
|
@ -136,8 +139,6 @@
|
||||||
"*"
|
"*"
|
||||||
] @punctuation.special
|
] @punctuation.special
|
||||||
|
|
||||||
; Misc
|
|
||||||
|
|
||||||
(field_modifier) @attribute
|
(field_modifier) @attribute
|
||||||
|
|
||||||
["{" "}"] @punctuation.bracket
|
["{" "}"] @punctuation.bracket
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue