mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17: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"
|
||||
},
|
||||
"thrift": {
|
||||
"revision": "999a27d87b8f90a74306d4e79c5e22db3ab61633"
|
||||
"revision": "b05fca8fa29b9ecaae0cd153ba590e4b7f840819"
|
||||
},
|
||||
"tiger": {
|
||||
"revision": "a233ebe360a73a92c50978e5c4e9e471bc59ff42"
|
||||
|
|
|
|||
|
|
@ -19,11 +19,12 @@
|
|||
"list"
|
||||
"map"
|
||||
"set"
|
||||
"void"
|
||||
] @type.builtin
|
||||
|
||||
; Function
|
||||
|
||||
(function) @function
|
||||
(function_identifier) @function
|
||||
|
||||
; Fields
|
||||
|
||||
|
|
@ -32,6 +33,7 @@
|
|||
; Parameters
|
||||
|
||||
(param_identifier) @parameter
|
||||
(exception_param_identifier) @parameter
|
||||
|
||||
; Variables
|
||||
|
||||
|
|
@ -45,6 +47,8 @@
|
|||
; Types
|
||||
|
||||
(enum_identifier) @type
|
||||
(exception_identifier) @type
|
||||
(exception_param_type) @type
|
||||
(field_type) @type
|
||||
(type_identifier) @type
|
||||
|
||||
|
|
@ -64,14 +68,12 @@
|
|||
; Exceptions
|
||||
|
||||
[
|
||||
(exception)
|
||||
(throws)
|
||||
"throws"
|
||||
] @exception
|
||||
|
||||
; Keywords
|
||||
|
||||
[
|
||||
"const"
|
||||
"cpp_include"
|
||||
"enum"
|
||||
"exception"
|
||||
|
|
@ -84,10 +86,8 @@
|
|||
"senum"
|
||||
"service"
|
||||
"struct"
|
||||
"throws"
|
||||
"typedef"
|
||||
"union"
|
||||
"void"
|
||||
] @keyword
|
||||
|
||||
; Deprecated Keywords
|
||||
|
|
@ -113,7 +113,7 @@
|
|||
"xsd_optional"
|
||||
] @keyword
|
||||
|
||||
(namespace_scope) @keyword
|
||||
(namespace_scope) @namespace
|
||||
|
||||
; Literals
|
||||
|
||||
|
|
@ -125,9 +125,12 @@
|
|||
|
||||
(boolean) @boolean
|
||||
|
||||
; Typedefs
|
||||
(typedef_definition) @type.definition
|
||||
(namespace_definition) @type.definition
|
||||
|
||||
; Misc
|
||||
|
||||
[
|
||||
"const"
|
||||
] @type.qualifier
|
||||
|
|
@ -136,8 +139,6 @@
|
|||
"*"
|
||||
] @punctuation.special
|
||||
|
||||
; Misc
|
||||
|
||||
(field_modifier) @attribute
|
||||
|
||||
["{" "}"] @punctuation.bracket
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue