mirror of https://github.com/helix-editor/helix
queries: Update highlights for Odin (#13877)
parent
6a090471a8
commit
f7ab5ec4a1
|
@ -8,29 +8,32 @@
|
||||||
(tag)
|
(tag)
|
||||||
] @keyword.directive
|
] @keyword.directive
|
||||||
|
|
||||||
[
|
|
||||||
"package"
|
|
||||||
] @namespace
|
|
||||||
|
|
||||||
[
|
[
|
||||||
"import"
|
"import"
|
||||||
] @keyword.control.import
|
] @keyword.control.import
|
||||||
|
|
||||||
[
|
[
|
||||||
|
"package"
|
||||||
"foreign"
|
"foreign"
|
||||||
"using"
|
"using"
|
||||||
"struct"
|
|
||||||
"enum"
|
|
||||||
"union"
|
|
||||||
"defer"
|
|
||||||
"cast"
|
"cast"
|
||||||
"transmute"
|
"transmute"
|
||||||
"auto_cast"
|
"auto_cast"
|
||||||
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"defer"
|
||||||
|
] @keyword.control
|
||||||
|
|
||||||
|
[
|
||||||
|
"struct"
|
||||||
|
"enum"
|
||||||
|
"union"
|
||||||
"map"
|
"map"
|
||||||
"bit_set"
|
"bit_set"
|
||||||
"matrix"
|
"matrix"
|
||||||
"bit_field"
|
"bit_field"
|
||||||
] @keyword
|
] @keyword.storage.type
|
||||||
|
|
||||||
[
|
[
|
||||||
"proc"
|
"proc"
|
||||||
|
@ -151,7 +154,7 @@
|
||||||
|
|
||||||
(character) @string
|
(character) @string
|
||||||
|
|
||||||
(escape_sequence) @string.special
|
(escape_sequence) @constant.character.escape
|
||||||
|
|
||||||
(boolean) @constant.builtin.boolean
|
(boolean) @constant.builtin.boolean
|
||||||
|
|
||||||
|
@ -194,6 +197,39 @@
|
||||||
|
|
||||||
(call_expression function: (identifier) @function)
|
(call_expression function: (identifier) @function)
|
||||||
|
|
||||||
|
(call_expression
|
||||||
|
function: (identifier) @function.builtin
|
||||||
|
(#any-of? @function.builtin
|
||||||
|
"abs" "align_of" "append" "append_elem" "append_elem_string"
|
||||||
|
"append_elems" "append_nothing" "append_soa" "append_soa_elem"
|
||||||
|
"append_soa_elems" "append_string" "assert" "assert_contextless"
|
||||||
|
"assign_at" "assign_at_elem" "assign_at_elem_string" "assign_at_elems"
|
||||||
|
"cap" "card" "clamp" "clear" "clear_dynamic_array" "clear_map" "clear_soa"
|
||||||
|
"complex" "conj" "container_of" "copy" "copy_from_string" "copy_slice"
|
||||||
|
"delete" "delete_cstring" "delete_dynamic_array" "delete_key"
|
||||||
|
"delete_map" "delete_slice" "delete_soa" "delete_string"
|
||||||
|
"expand_values" "free" "free_all" "imag" "init_global_temporary_allocator"
|
||||||
|
"inject_at" "inject_at_elem" "inject_at_elem_string" "inject_at_elems"
|
||||||
|
"jmag" "kmag" "len" "make" "make_dynamic_array" "make_dynamic_array_len"
|
||||||
|
"make_dynamic_array_len_cap" "make_map" "make_multi_pointer" "make_slice"
|
||||||
|
"make_soa" "make_soa_aligned" "make_soa_dynamic_array"
|
||||||
|
"make_soa_dynamic_array_len" "make_soa_dynamic_array_len_cap"
|
||||||
|
"make_soa_slice" "map_insert" "map_upsert" "max" "min"
|
||||||
|
"new_clone" "non_zero_append" "non_zero_append_elem"
|
||||||
|
"non_zero_append_elem_string" "non_zero_append_elems"
|
||||||
|
"non_zero_append_soa_elem" "non_zero_append_soa_elems"
|
||||||
|
"non_zero_resize" "non_zero_resize_dynamic_array" "non_zero_resize_soa"
|
||||||
|
"non_zero_reserve" "non_zero_reserve_dynamic_array" "non_zero_reserve_soa"
|
||||||
|
"offset_of" "offset_of_by_string" "offset_of_member" "offset_of_selector"
|
||||||
|
"ordered_remove" "panic" "panic_contextless" "pop" "pop_front"
|
||||||
|
"pop_front_safe" "pop_safe" "raw_data" "raw_soa_footer_dynamic_array"
|
||||||
|
"raw_soa_footer_slice" "real" "remove_range" "reserve"
|
||||||
|
"reserve_dynamic_array" "reserve_map" "reserve_soa" "resize"
|
||||||
|
"resize_dynamic_array" "resize_soa" "shrink" "shrink_map"
|
||||||
|
"size_of" "soa_unzip" "soa_zip" "swizzle" "type_info_of" "type_of"
|
||||||
|
"typeid_of" "unordered_remove" "unordered_remove_soa"
|
||||||
|
"unimplemented" "unimplemented_contextless"))
|
||||||
|
|
||||||
; Types
|
; Types
|
||||||
|
|
||||||
(struct_declaration (identifier) @type "::")
|
(struct_declaration (identifier) @type "::")
|
||||||
|
@ -239,6 +275,10 @@
|
||||||
; Fields
|
; Fields
|
||||||
|
|
||||||
(member_expression "." (identifier) @variable.other.member)
|
(member_expression "." (identifier) @variable.other.member)
|
||||||
|
(member_expression
|
||||||
|
(identifier) "."
|
||||||
|
(call_expression
|
||||||
|
function: (identifier) @function.method))
|
||||||
|
|
||||||
(struct_type "{" (identifier) @variable.other.member)
|
(struct_type "{" (identifier) @variable.other.member)
|
||||||
|
|
||||||
|
@ -256,7 +296,7 @@
|
||||||
|
|
||||||
(using_statement (identifier) @namespace)
|
(using_statement (identifier) @namespace)
|
||||||
|
|
||||||
(import_declaration (identifier) @keyword.storage.type)
|
(import_declaration (identifier) @namespace)
|
||||||
|
|
||||||
; Parameters
|
; Parameters
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue