From: Ruben Beltran del Rio Date: Wed, 4 Oct 2023 14:41:51 +0000 (+0200) Subject: Define identifiers as type definitions X-Git-Url: https://git.r.bdr.sh/rbdr/tree-sitter-api-notation/commitdiff_plain/75b4720ce734556ef3c13059f16d21d8c5e73e9d?ds=sidebyside;hp=809b13f346c40e1a6cafb4f9d0bd0ebaa84582a3 Define identifiers as type definitions --- diff --git a/queries/highlights.scm b/queries/highlights.scm index b7a3e9e..cf92992 100644 --- a/queries/highlights.scm +++ b/queries/highlights.scm @@ -4,7 +4,7 @@ (parameter_list) @function (parameter_list (identifier (optional_value) @variable.parameter.optional)) (parameter_list (identifier) @variable.parameter) -(identifier) @keyword +(identifier) @type.definition (throw_statement) @operator (return_statement) @operator (comment) @comment diff --git a/test/highlight/notation.api b/test/highlight/notation.api index c20f11a..f0a9a7a 100644 --- a/test/highlight/notation.api +++ b/test/highlight/notation.api @@ -1,14 +1,14 @@ Forum.Models.Post -// <- keyword -// ^ keyword -// ^ keyword +// <- type.definition +// ^ type.definition +// ^ type.definition +glyphs > //<- operator //^ property // ^ type - // ^ keyword + // ^ type.definition // ^ type - // ^ keyword + // ^ type.definition // ^ type -id @@ -22,7 +22,7 @@ Forum.Models.Post // ^ function // ^ variable.parameter // ^ type - // ^ keyword + // ^ type.definition // ^ type // ^ function ->authorUpdated(author ) @@ -36,13 +36,13 @@ Forum.Models.Post // ^ function // ^ variable.parameter // ^ type - // ^ keyword + // ^ type.definition // ^ type // ^ function // ^ operator - // ^ keyword + // ^ type.definition // ^ operator - // ^ keyword + // ^ type.definition ::get(id ) => Promise #update(text ) => Promise #transform([transformer] (T) => boolean>) @@ -51,4 +51,4 @@ Forum.Models.Post // ^ function // ^ variable.parameter.optional // ^ type - // ^ keyword + // ^ type.definition