feat(thrift): refactor queries for better highlights, fixes bugs where certain ones went past where they should've ended

This commit is contained in:
Amaan Qureshi 2023-01-22 22:27:45 -05:00 committed by Stephan Seitz
parent 7bef1d5330
commit 1913ce2fd2
2 changed files with 11 additions and 10 deletions

View file

@ -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