From bd9cb6761e80a8b1a5fa52f0eaf1eafb375e76d0 Mon Sep 17 00:00:00 2001 From: Shawon Date: Sun, 21 Sep 2025 23:07:19 +0600 Subject: [PATCH] fix(kitty): Generalized highlight query for `','` fix(kitty): Fixed issue with highlighting ease keywords --- lua/nvim-treesitter/parsers.lua | 2 +- runtime/queries/kitty/highlights.scm | 32 ++++++---------------------- 2 files changed, 7 insertions(+), 27 deletions(-) diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index b8688945a..41cfc83c7 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -1207,7 +1207,7 @@ return { }, kitty = { install_info = { - revision = '2c701bd6de4a54edfb5e2213ff8374b60061a61a', + revision = '399e13e53fbcd702f125082eba3940ef0a1781b2', url = 'https://github.com/OXY2DEV/tree-sitter-kitty', }, maintainers = { '@OXY2DEV' }, diff --git a/runtime/queries/kitty/highlights.scm b/runtime/queries/kitty/highlights.scm index 4083e4490..007f93f57 100644 --- a/runtime/queries/kitty/highlights.scm +++ b/runtime/queries/kitty/highlights.scm @@ -71,9 +71,6 @@ buffer: (string) @character) ; -(keyboard_mode - "," @punctuation.delimiter) - (keyboard_mode [ "normal" @@ -115,6 +112,8 @@ "=" @punctuation.delimiter +"," @punctuation.delimiter + (launch_type type: _ @type) @@ -339,9 +338,6 @@ "ungrabbed" ] @variable.parameter) -(mouse_mode - "," @punctuation.delimiter) - ; Options ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (option_name) @keyword @@ -407,7 +403,9 @@ ; ((ease) @type - (#match? @type "^[a-z-]$")) + (#any-of? @type + "linear" "ease" "ease-in-out" "ease-in" "ease-out" "step-start" "step-end" "ease" "ease-in" + "ease-out" "ease-in-out")) (ease_step "steps" @function.call) @@ -418,9 +416,6 @@ ")" ] @punctuation.bracket) -(ease_step - "," @punctuation.delimiter) - (ease_step position: (ease_step_position) @type) @@ -433,9 +428,6 @@ ")" ] @punctuation.bracket) -(cubic_bezier - "," @punctuation.delimiter) - ; (scrollback_pager command: (string) @string.special) @@ -449,18 +441,12 @@ characters: (string) @string.special) ; -(paste_action_list - "," @punctuation.delimiter) - (paste_action) @type ; (pointer) @type ; -(layout_list - "," @punctuation.delimiter) - (layout) @type ; @@ -471,9 +457,6 @@ ] @type) ; -(scale_value - "," @punctuation.delimiter) - ; (transparent_color "@" @punctuation.special @@ -522,9 +505,6 @@ (shell_feature) @type ; -(source_stratagies - "," @punctuation.delimiter) - (source_strategy) @type ; @@ -569,4 +549,4 @@ name: (string) @string.special) ; Comment ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(comment) @comment @spell +(comment) @comment