From 083bb0118fd24bba897ac351534637196cafb40a Mon Sep 17 00:00:00 2001 From: Akseli Date: Tue, 1 Oct 2024 04:05:28 +0300 Subject: [PATCH] Fix some odin highlights (#11804) Some of the odin highlights seemed wrong or lacking, like the import names were not being matched: ```odin // color both "rl" here to same value import rl "vendor:raylib" ... rl.Vector3 ``` Import color was also not being used correctly --- runtime/queries/odin/highlights.scm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/runtime/queries/odin/highlights.scm b/runtime/queries/odin/highlights.scm index bdc4c1290..ed302cdbf 100644 --- a/runtime/queries/odin/highlights.scm +++ b/runtime/queries/odin/highlights.scm @@ -4,10 +4,13 @@ ] @keyword.directive [ - "import" - "package" + "package" ] @namespace +[ + "import" +] @keyword.control.import + [ "foreign" "using" @@ -200,7 +203,7 @@ (struct . (identifier) @type) -(field_type . (identifier) "." (identifier) @type) +(field_type . (identifier) @keyword.storage.type "." (identifier) @type) (bit_set_type (identifier) @type ";") @@ -248,6 +251,8 @@ (using_statement (identifier) @namespace) +(import_declaration (identifier) @keyword.storage.type) + ; Parameters (parameter (identifier) @variable.parameter ":" "="? (identifier)? @constant)