Skip to content

Commit

Permalink
fix(gdscript/jai): Replace with supported faces (#229)
Browse files Browse the repository at this point in the history
* fix(gdscript/jai): Replace with supported face

* imp hl

* Update jai

* update query

* hl param
  • Loading branch information
jcs090218 authored Sep 1, 2023
1 parent 262d000 commit a71ac61
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 15 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## Unreleased
- Replace with supported faces for `GDScript` and `Jai`

## 0.12.32 - 2023-09-01

Expand Down
14 changes: 7 additions & 7 deletions queries/gdscript/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
(null) @constant
(setter) @function
(getter) @function
(set_body "set" @keyword.function)
(get_body "get" @keyword.function)
(set_body "set" @keyword)
(get_body "get" @keyword)
(static_keyword) @type.qualifier
(tool_statement) @keyword
(breakpoint_statement) @debug
Expand Down Expand Up @@ -91,9 +91,9 @@

["," "." ":"] @punctuation.delimiter

["if" "elif" "else" "match"] @conditional
["if" "elif" "else" "match"] @keyword

["for" "while" "break" "continue"] @repeat
["for" "while" "break" "continue"] @keyword

[
"~"
Expand Down Expand Up @@ -135,7 +135,7 @@
"is"
"not"
"or"
] @keyword.operator
] @keyword

[
"pass"
Expand All @@ -156,11 +156,11 @@
"puppetsync"
] @keyword

"func" @keyword.function
"func" @keyword

[
"return"
] @keyword.return
] @keyword

[
"await"
Expand Down
52 changes: 44 additions & 8 deletions queries/jai/highlights.scm
Original file line number Diff line number Diff line change
@@ -1,12 +1,48 @@
; highlights.scm
;; highlights.scm

"if" @keyword
"return" @keyword
"else" @keyword
"for" @keyword
"while" @keyword
"using" @keyword
"struct" @type
[
(cast_expression)
] @type

[
"if"
"ifx"
"then"
"else"
"for"
"while"
"break"
"return"
] @keyword

(variable_initializer (identifier) @type)
(operator_definition) @operator

(parameter (identifier) (identifier) @type)
(trailing_return_types (parameter (identifier) @type))

[
(expression_like_directive)
"#assert"
"#type_info_none"
"#type_info_procedures_are_void_pointers"
"#no_padding"
"#specified"
"#must"
"#deprecated"
(trailing_directive)
"#code"
"#complete"
(operator_like_directive)
"#foreign"
"#align"
"#module_parameters"
(module_scope_directive)
"#if"
"#load"
"#insert"
"#program_export"
] @function.macro

(string_literal) @string
;;(built_in_type) @type
Expand Down

0 comments on commit a71ac61

Please sign in to comment.