fix(lua): injections for comment and luadoc

This commit is contained in:
Munif Tanjim 2023-08-16 20:06:01 +06:00 committed by Christian Clason
parent 7c27beddda
commit 5f01ffd478

View file

@ -33,10 +33,10 @@
(#lua-match? @injection.content "^%s*;+%s?query")
(#set! injection.language "query"))
((comment) @injection.content
(#lua-match? @injection.content "[-][-][-][%s]*@")
(comment content: (_) @injection.content
(#lua-match? @injection.content "^[-][%s]*@")
(#set! injection.language "luadoc")
(#offset! @injection.content 0 3 0 0))
(#offset! @injection.content 0 1 0 0))
; string.match("123", "%d+")
(function_call
@ -64,4 +64,5 @@
(#any-of? @_method "gmatch" "gsub"))
arguments: (arguments (string content: _ @injection.content (#set! injection.language "luap"))))
((comment) @injection.content (#set! injection.language "comment"))
(comment content: (_) @injection.content
(#set! injection.language "comment"))