mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 02:40:09 -04:00
fix(kitty): Revised highlight queries
This commit is contained in:
parent
bd9cb6761e
commit
fbf351dec8
2 changed files with 27 additions and 102 deletions
|
|
@ -1207,7 +1207,7 @@ return {
|
||||||
},
|
},
|
||||||
kitty = {
|
kitty = {
|
||||||
install_info = {
|
install_info = {
|
||||||
revision = '399e13e53fbcd702f125082eba3940ef0a1781b2',
|
revision = 'b5a5f714ab0f2c9c459101b4540914e214248690',
|
||||||
url = 'https://github.com/OXY2DEV/tree-sitter-kitty',
|
url = 'https://github.com/OXY2DEV/tree-sitter-kitty',
|
||||||
},
|
},
|
||||||
maintainers = { '@OXY2DEV' },
|
maintainers = { '@OXY2DEV' },
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
; Extra Nodes ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
; Extra Nodes ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
(line_continuation) @comment
|
(line_continuation) @comment
|
||||||
|
|
||||||
|
(comment
|
||||||
|
(comment_content) @spell) @comment
|
||||||
|
|
||||||
; Primitive data types ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
; Primitive data types ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
[
|
[
|
||||||
(pixel)
|
(pixel)
|
||||||
|
|
@ -8,21 +11,15 @@
|
||||||
(number)
|
(number)
|
||||||
] @number
|
] @number
|
||||||
|
|
||||||
(pixel
|
|
||||||
"px" @type)
|
|
||||||
|
|
||||||
(percentage
|
|
||||||
"%" @type)
|
|
||||||
|
|
||||||
[
|
[
|
||||||
(boolean)
|
"px"
|
||||||
"enabled"
|
"%"
|
||||||
"disabled"
|
] @type
|
||||||
] @boolean
|
|
||||||
|
(boolean) @boolean
|
||||||
|
|
||||||
(layout_type) @type
|
(layout_type) @type
|
||||||
|
|
||||||
;
|
|
||||||
; Hexadecimal colors.
|
; Hexadecimal colors.
|
||||||
(color) @constant
|
(color) @constant
|
||||||
|
|
||||||
|
|
@ -30,14 +27,12 @@
|
||||||
((color) @constant
|
((color) @constant
|
||||||
(#match? @constant "^[^#]"))
|
(#match? @constant "^[^#]"))
|
||||||
|
|
||||||
;
|
|
||||||
(string) @string
|
(string) @string
|
||||||
|
|
||||||
(time
|
(time
|
||||||
duration: (number) @number
|
duration: (number) @number
|
||||||
suffix: (time_suffix) @type)
|
suffix: (time_suffix) @type)
|
||||||
|
|
||||||
;
|
|
||||||
[
|
[
|
||||||
(ctrl)
|
(ctrl)
|
||||||
(alt)
|
(alt)
|
||||||
|
|
@ -70,7 +65,6 @@
|
||||||
(paste_from_buffer
|
(paste_from_buffer
|
||||||
buffer: (string) @character)
|
buffer: (string) @character)
|
||||||
|
|
||||||
;
|
|
||||||
(keyboard_mode
|
(keyboard_mode
|
||||||
[
|
[
|
||||||
"normal"
|
"normal"
|
||||||
|
|
@ -79,7 +73,6 @@
|
||||||
"all"
|
"all"
|
||||||
] @constant)
|
] @constant)
|
||||||
|
|
||||||
;
|
|
||||||
(show_kitty_doc
|
(show_kitty_doc
|
||||||
topic: (string) @label)
|
topic: (string) @label)
|
||||||
|
|
||||||
|
|
@ -90,11 +83,9 @@
|
||||||
action: (clear_action) @constant
|
action: (clear_action) @constant
|
||||||
target: (clear_target) @type)
|
target: (clear_target) @type)
|
||||||
|
|
||||||
;
|
|
||||||
(combine_action
|
(combine_action
|
||||||
(separator) @punctuation.delimiter)
|
(separator) @punctuation.delimiter)
|
||||||
|
|
||||||
;
|
|
||||||
(disable_ligatures_in
|
(disable_ligatures_in
|
||||||
target: (ligature_target) @type
|
target: (ligature_target) @type
|
||||||
type: (ligature_disabled) @constant)
|
type: (ligature_disabled) @constant)
|
||||||
|
|
@ -135,7 +126,6 @@
|
||||||
(launch_next_to
|
(launch_next_to
|
||||||
pattern: (string) @string.regexp)
|
pattern: (string) @string.regexp)
|
||||||
|
|
||||||
;
|
|
||||||
(launch_remote_password
|
(launch_remote_password
|
||||||
[
|
[
|
||||||
"'"
|
"'"
|
||||||
|
|
@ -148,11 +138,9 @@
|
||||||
(remote_actions
|
(remote_actions
|
||||||
(string) @constant.macro)
|
(string) @constant.macro)
|
||||||
|
|
||||||
;
|
|
||||||
(launch_stdin_source
|
(launch_stdin_source
|
||||||
source: (stdin_source) @type)
|
source: (stdin_source) @type)
|
||||||
|
|
||||||
;
|
|
||||||
(markers
|
(markers
|
||||||
type: (marker_type) @type)
|
type: (marker_type) @type)
|
||||||
|
|
||||||
|
|
@ -160,7 +148,6 @@
|
||||||
id: (marker_id) @label
|
id: (marker_id) @label
|
||||||
pattern: (string) @string.regexp)
|
pattern: (string) @string.regexp)
|
||||||
|
|
||||||
;
|
|
||||||
(launch_os_window_class
|
(launch_os_window_class
|
||||||
class: (string) @type)
|
class: (string) @type)
|
||||||
|
|
||||||
|
|
@ -193,11 +180,9 @@
|
||||||
option: (_
|
option: (_
|
||||||
(option) @variable.builtin))
|
(option) @variable.builtin))
|
||||||
|
|
||||||
;
|
|
||||||
(launch_watcher
|
(launch_watcher
|
||||||
path: (string) @string.special.path)
|
path: (string) @string.special.path)
|
||||||
|
|
||||||
;
|
|
||||||
(load_config_file
|
(load_config_file
|
||||||
path: (string)? @string.special.path)
|
path: (string)? @string.special.path)
|
||||||
|
|
||||||
|
|
@ -207,11 +192,9 @@
|
||||||
(remote_control_script
|
(remote_control_script
|
||||||
path: (string) @string.special.path)
|
path: (string) @string.special.path)
|
||||||
|
|
||||||
;
|
|
||||||
(handle_click_actions
|
(handle_click_actions
|
||||||
_ @type)
|
_ @type)
|
||||||
|
|
||||||
;
|
|
||||||
(mouse_selection
|
(mouse_selection
|
||||||
selection: (mouse_selection_type) @type)
|
selection: (mouse_selection_type) @type)
|
||||||
|
|
||||||
|
|
@ -258,7 +241,6 @@
|
||||||
(nth_os_window
|
(nth_os_window
|
||||||
window: (number) @label)
|
window: (number) @label)
|
||||||
|
|
||||||
;
|
|
||||||
(goto_layout
|
(goto_layout
|
||||||
":" @punctuation.delimiter)
|
":" @punctuation.delimiter)
|
||||||
|
|
||||||
|
|
@ -266,7 +248,6 @@
|
||||||
(layout_option
|
(layout_option
|
||||||
value: (string) @constant)
|
value: (string) @constant)
|
||||||
|
|
||||||
;
|
|
||||||
(aliased_action
|
(aliased_action
|
||||||
name: (string) @function.call)
|
name: (string) @function.call)
|
||||||
|
|
||||||
|
|
@ -290,7 +271,6 @@
|
||||||
(color_match_tab
|
(color_match_tab
|
||||||
(string) @string.regexp)
|
(string) @string.regexp)
|
||||||
|
|
||||||
;
|
|
||||||
(color_option
|
(color_option
|
||||||
name: (color_option_name) @keyword)
|
name: (color_option_name) @keyword)
|
||||||
|
|
||||||
|
|
@ -341,7 +321,6 @@
|
||||||
; Options ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
; Options ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
(option_name) @keyword
|
(option_name) @keyword
|
||||||
|
|
||||||
;
|
|
||||||
(font_value
|
(font_value
|
||||||
(string) @string.special)
|
(string) @string.special)
|
||||||
|
|
||||||
|
|
@ -351,10 +330,8 @@
|
||||||
(#any-of? @constant "auto" "monospace" "bold" "italic" "bold-italic") .)
|
(#any-of? @constant "auto" "monospace" "bold" "italic" "bold-italic") .)
|
||||||
|
|
||||||
(font_property
|
(font_property
|
||||||
name: (string) @variable.parameter
|
name: (string) @variable.parameter)
|
||||||
"=" @punctuation.delimiter)
|
|
||||||
|
|
||||||
;
|
|
||||||
(symbol_map
|
(symbol_map
|
||||||
codepoints: (string) @constant
|
codepoints: (string) @constant
|
||||||
font_name: (string) @string.special)
|
font_name: (string) @string.special)
|
||||||
|
|
@ -362,7 +339,6 @@
|
||||||
(narrow_symbols
|
(narrow_symbols
|
||||||
codepoints: (string) @constant)
|
codepoints: (string) @constant)
|
||||||
|
|
||||||
;
|
|
||||||
(font_features
|
(font_features
|
||||||
font: (string)? @constant)
|
font: (string)? @constant)
|
||||||
|
|
||||||
|
|
@ -372,7 +348,6 @@
|
||||||
(feature_list
|
(feature_list
|
||||||
(string) @string.special)
|
(string) @string.special)
|
||||||
|
|
||||||
;
|
|
||||||
(modify_font
|
(modify_font
|
||||||
type: (font_modification_type) @type)
|
type: (font_modification_type) @type)
|
||||||
|
|
||||||
|
|
@ -387,34 +362,29 @@
|
||||||
"dense"
|
"dense"
|
||||||
] @constant)
|
] @constant)
|
||||||
|
|
||||||
;
|
|
||||||
((composition_value) @constant
|
((composition_value) @constant
|
||||||
(#eq? @constant "platform"))
|
(#eq? @constant "platform"))
|
||||||
|
|
||||||
;
|
|
||||||
(fg_override_threshold
|
(fg_override_threshold
|
||||||
[
|
[
|
||||||
"ratio"
|
"ratio"
|
||||||
"%"
|
"%"
|
||||||
] @type)
|
] @type)
|
||||||
|
|
||||||
;
|
|
||||||
(cursor) @type
|
(cursor) @type
|
||||||
|
|
||||||
;
|
|
||||||
((ease) @type
|
((ease) @type
|
||||||
(#any-of? @type
|
(#any-of? @type
|
||||||
"linear" "ease" "ease-in-out" "ease-in" "ease-out" "step-start" "step-end" "ease" "ease-in"
|
"linear" "ease" "ease-in-out" "ease-in" "ease-out" "step-start" "step-end" "ease" "ease-in"
|
||||||
"ease-out" "ease-in-out"))
|
"ease-out" "ease-in-out"))
|
||||||
|
|
||||||
(ease_step
|
[
|
||||||
"steps" @function.call)
|
"("
|
||||||
|
")"
|
||||||
|
] @punctuation.bracket
|
||||||
|
|
||||||
(ease_step
|
(ease_step
|
||||||
[
|
"steps" @function.call)
|
||||||
"("
|
|
||||||
")"
|
|
||||||
] @punctuation.bracket)
|
|
||||||
|
|
||||||
(ease_step
|
(ease_step
|
||||||
position: (ease_step_position) @type)
|
position: (ease_step_position) @type)
|
||||||
|
|
@ -422,62 +392,38 @@
|
||||||
(cubic_bezier
|
(cubic_bezier
|
||||||
"cubic-bezier" @function.call)
|
"cubic-bezier" @function.call)
|
||||||
|
|
||||||
(cubic_bezier
|
|
||||||
[
|
|
||||||
"("
|
|
||||||
")"
|
|
||||||
] @punctuation.bracket)
|
|
||||||
|
|
||||||
;
|
|
||||||
(scrollback_pager
|
(scrollback_pager
|
||||||
command: (string) @string.special)
|
command: (string) @string.special)
|
||||||
|
|
||||||
;
|
|
||||||
(url_prefix_list
|
(url_prefix_list
|
||||||
(string) @constant)
|
(string) @constant)
|
||||||
|
|
||||||
;
|
|
||||||
(url_excluded_characters
|
(url_excluded_characters
|
||||||
characters: (string) @string.special)
|
characters: (string) @string.special)
|
||||||
|
|
||||||
;
|
|
||||||
(paste_action) @type
|
|
||||||
|
|
||||||
;
|
|
||||||
(pointer) @type
|
|
||||||
|
|
||||||
;
|
|
||||||
(layout) @type
|
|
||||||
|
|
||||||
;
|
|
||||||
(border_width
|
(border_width
|
||||||
[
|
[
|
||||||
"px"
|
"px"
|
||||||
"pt"
|
"pt"
|
||||||
] @type)
|
] @type)
|
||||||
|
|
||||||
;
|
|
||||||
;
|
|
||||||
(transparent_color
|
(transparent_color
|
||||||
"@" @punctuation.special
|
"@" @punctuation.special
|
||||||
(alpha) @number)
|
(alpha) @number)
|
||||||
|
|
||||||
;
|
|
||||||
(remote_control_password
|
(remote_control_password
|
||||||
password: (string) @string.special)
|
password: (string) @string.special)
|
||||||
|
|
||||||
(remote_actions
|
(remote_actions
|
||||||
(string) @type)
|
(string) @type)
|
||||||
|
|
||||||
;
|
|
||||||
(env
|
(env
|
||||||
variable: (string) @variable.builtin
|
variable: (string) @variable.builtin)
|
||||||
"=" @punctuation.delimiter)
|
|
||||||
|
|
||||||
((filter_sequence) @constant
|
((filter_sequence) @constant
|
||||||
(#eq? @constant "all"))
|
(#eq? @constant "all"))
|
||||||
|
|
||||||
(boolean_expression) @operator
|
(boolean_operator) @keyword.operator
|
||||||
|
|
||||||
(filter_element
|
(filter_element
|
||||||
[
|
[
|
||||||
|
|
@ -489,26 +435,15 @@
|
||||||
":" @punctuation.delimiter
|
":" @punctuation.delimiter
|
||||||
(string) @string.regexp)
|
(string) @string.regexp)
|
||||||
|
|
||||||
(filter_element
|
[
|
||||||
"\"" @punctuation.delimiter)
|
(clipboard_action)
|
||||||
|
(shell_feature)
|
||||||
;
|
(source_strategy)
|
||||||
(clipboard_action) @type
|
(notification_time)
|
||||||
|
(paste_action)
|
||||||
;
|
(pointer)
|
||||||
((shell_features) @constant
|
(layout)
|
||||||
(#eq? @constant "enabled"))
|
] @type
|
||||||
|
|
||||||
((shell_features) @constant
|
|
||||||
(#eq? @constant "disabled"))
|
|
||||||
|
|
||||||
(shell_feature) @type
|
|
||||||
|
|
||||||
;
|
|
||||||
(source_strategy) @type
|
|
||||||
|
|
||||||
;
|
|
||||||
(notification_time) @type
|
|
||||||
|
|
||||||
(notification_action) @function.call
|
(notification_action) @function.call
|
||||||
|
|
||||||
|
|
@ -516,22 +451,15 @@
|
||||||
"command"
|
"command"
|
||||||
command: (string) @string.special)
|
command: (string) @string.special)
|
||||||
|
|
||||||
;
|
|
||||||
(menu_map
|
(menu_map
|
||||||
value: (string) @string.special)
|
value: (string) @string.special)
|
||||||
|
|
||||||
;
|
|
||||||
((titlebar_color) @constant
|
((titlebar_color) @constant
|
||||||
(#eq? @constant "system"))
|
(#any-of? @constant "system" "background"))
|
||||||
|
|
||||||
((titlebar_color) @constant
|
|
||||||
(#eq? @constant "background"))
|
|
||||||
|
|
||||||
;
|
|
||||||
(confirm_os_window_close
|
(confirm_os_window_close
|
||||||
count_background: (string) @constant)
|
count_background: (string) @constant)
|
||||||
|
|
||||||
;
|
|
||||||
(initial_window_size
|
(initial_window_size
|
||||||
[
|
[
|
||||||
"initial_window_width"
|
"initial_window_width"
|
||||||
|
|
@ -547,6 +475,3 @@
|
||||||
"kitten_alias"
|
"kitten_alias"
|
||||||
] @keyword
|
] @keyword
|
||||||
name: (string) @string.special)
|
name: (string) @string.special)
|
||||||
|
|
||||||
; Comment ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
(comment) @comment
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue