fix(lua_inject): remove need for surrounding quote (#4740)

This commit is contained in:
Pham Huy Hoang 2023-05-01 12:46:03 +09:00 committed by GitHub
parent da79f9afe6
commit 25bdc313c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,9 +19,9 @@
; vim.rcprequest(123, "nvim_exec_lua", "return vim.api.nvim_buf_get_lines(0, 0, -1, false)", false)
((function_call
name: (_) @_vimcmd_identifier
arguments: (arguments . (_) . (string) @_method . (string content: _ @lua)))
arguments: (arguments . (_) . (string content: _ @_method) . (string content: _ @lua)))
(#any-of? @_vimcmd_identifier "vim.rpcrequest" "vim.rpcnotify")
(#any-of? @_method "\"nvim_exec_lua\"" "'nvim_exec_lua'" "[[nvim_exec_lua]]"))
(#eq? @_method "nvim_exec_lua"))
; highlight string as query if starts with `;; query`
(string content: _ @query (#lua-match? @query "^%s*;+%s?query"))