From 1913ce2fd2caa406455d058802cd04f5b6f046e1 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Sun, 22 Jan 2023 22:27:45 -0500 Subject: feat(thrift): refactor queries for better highlights, fixes bugs where certain ones went past where they should've ended --- queries/thrift/highlights.scm | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'queries') 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 -- cgit v1.3.1