From edee83272efe9b597bc27e8060539cdffa3b12a8 Mon Sep 17 00:00:00 2001 From: Pham Huy Hoang Date: Fri, 5 Jan 2024 03:19:54 +0900 Subject: refactor: manual pre-cleanup Moving comments, adding `format-ignore` to lines that will be better with it --- queries/lua/highlights.scm | 3 ++- queries/lua/injections.scm | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'queries/lua') diff --git a/queries/lua/highlights.scm b/queries/lua/highlights.scm index 0cb861596..ea87c0da0 100644 --- a/queries/lua/highlights.scm +++ b/queries/lua/highlights.scm @@ -220,8 +220,9 @@ (function_call (identifier) @function.builtin + ; format-ignore (#any-of? @function.builtin - ;; built-in functions in Lua 5.1 + ; built-in functions in Lua 5.1 "assert" "collectgarbage" "dofile" "error" "getfenv" "getmetatable" "ipairs" "load" "loadfile" "loadstring" "module" "next" "pairs" "pcall" "print" "rawequal" "rawget" "rawlen" "rawset" "require" "select" "setfenv" "setmetatable" diff --git a/queries/lua/injections.scm b/queries/lua/injections.scm index 03e057dfe..2ce156574 100644 --- a/queries/lua/injections.scm +++ b/queries/lua/injections.scm @@ -67,14 +67,15 @@ . (string content: (_) @injection.content) - . (_) .) ; Limiting predicate handling to only functions with 4 arguments + . (_) + .) ; Limiting predicate handling to only functions with 4 arguments (#eq? @_user_cmd "vim.api.nvim_buf_create_user_command") (#set! injection.language "vim")) ;; rhs highlighting for vim.keymap.set/vim.api.nvim_set_keymap/vim.api.nvim_buf_set_keymap ; (function_call ; name: (_) @_map -; arguments: +; arguments: ; (arguments ; . (_) ; . (_) @@ -86,7 +87,7 @@ ; ; (function_call ; name: (_) @_map -; arguments: +; arguments: ; (arguments ; . (_) ; . (_) -- cgit v1.2.3-70-g09d2