injections(lua): tweak query to capture string content (#4707)

This commit is contained in:
Munif Tanjim 2023-04-25 20:05:52 +06:00 committed by GitHub
parent 87faf372eb
commit 75f911d01f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,7 +24,7 @@
(#any-of? @_method "\"nvim_exec_lua\"" "'nvim_exec_lua'" "[[nvim_exec_lua]]"))
; highlight string as query if starts with `;; query`
((string ("string_content") @query) (#lua-match? @query "^%s*;+%s?query"))
(string content: _ @query (#lua-match? @query "^%s*;+%s?query"))
((comment) @luadoc
(#lua-match? @luadoc "[-][-][-][%s]*@")