diff options
| author | Amaan Qureshi <amaanq12@gmail.com> | 2023-01-22 22:27:45 -0500 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2023-01-23 08:42:27 +0100 |
| commit | 1913ce2fd2caa406455d058802cd04f5b6f046e1 (patch) | |
| tree | 74343e56c568c789315b6ce7be38535dbf5ed2e2 /queries | |
| parent | highlights(rst): don't spell check links (diff) | |
| download | nvim-treesitter-1913ce2fd2caa406455d058802cd04f5b6f046e1.tar nvim-treesitter-1913ce2fd2caa406455d058802cd04f5b6f046e1.tar.gz nvim-treesitter-1913ce2fd2caa406455d058802cd04f5b6f046e1.tar.bz2 nvim-treesitter-1913ce2fd2caa406455d058802cd04f5b6f046e1.tar.lz nvim-treesitter-1913ce2fd2caa406455d058802cd04f5b6f046e1.tar.xz nvim-treesitter-1913ce2fd2caa406455d058802cd04f5b6f046e1.tar.zst nvim-treesitter-1913ce2fd2caa406455d058802cd04f5b6f046e1.zip | |
feat(thrift): refactor queries for better highlights, fixes bugs where certain ones went past where they should've ended
Diffstat (limited to 'queries')
| -rw-r--r-- | queries/thrift/highlights.scm | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/queries/thrift/highlights.scm b/queries/thrift/highlights.scm index d3795aef8..d06fbe03f 100644 --- a/queries/thrift/highlights.scm +++ b/queries/thrift/highlights.scm @@ -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 |
