Skip to content

Commit

Permalink
Fix some odin highlights (#11804)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Akselmo authored Oct 1, 2024
1 parent cb9307b commit 083bb01
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions runtime/queries/odin/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
] @keyword.directive

[
"import"
"package"
"package"
] @namespace

[
"import"
] @keyword.control.import

[
"foreign"
"using"
Expand Down Expand Up @@ -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 ";")

Expand Down Expand Up @@ -248,6 +251,8 @@

(using_statement (identifier) @namespace)

(import_declaration (identifier) @keyword.storage.type)

; Parameters

(parameter (identifier) @variable.parameter ":" "="? (identifier)? @constant)
Expand Down

0 comments on commit 083bb01

Please sign in to comment.