Unnamed repository; edit this file 'description' to name the repository.
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
Akseli 2024-10-01
parent cb9307b · commit 083bb01
-rw-r--r--runtime/queries/odin/highlights.scm11
1 files changed, 8 insertions, 3 deletions
diff --git a/runtime/queries/odin/highlights.scm b/runtime/queries/odin/highlights.scm
index bdc4c129..ed302cdb 100644
--- a/runtime/queries/odin/highlights.scm
+++ b/runtime/queries/odin/highlights.scm
@@ -4,11 +4,14 @@
] @keyword.directive
[
- "import"
- "package"
+ "package"
] @namespace
[
+ "import"
+] @keyword.control.import
+
+[
"foreign"
"using"
"struct"
@@ -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)