mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 10:50:06 -04:00
fix(lua): injections for comment and luadoc
This commit is contained in:
parent
7c27beddda
commit
5f01ffd478
1 changed files with 5 additions and 4 deletions
|
|
@ -33,10 +33,10 @@
|
||||||
(#lua-match? @injection.content "^%s*;+%s?query")
|
(#lua-match? @injection.content "^%s*;+%s?query")
|
||||||
(#set! injection.language "query"))
|
(#set! injection.language "query"))
|
||||||
|
|
||||||
((comment) @injection.content
|
(comment content: (_) @injection.content
|
||||||
(#lua-match? @injection.content "[-][-][-][%s]*@")
|
(#lua-match? @injection.content "^[-][%s]*@")
|
||||||
(#set! injection.language "luadoc")
|
(#set! injection.language "luadoc")
|
||||||
(#offset! @injection.content 0 3 0 0))
|
(#offset! @injection.content 0 1 0 0))
|
||||||
|
|
||||||
; string.match("123", "%d+")
|
; string.match("123", "%d+")
|
||||||
(function_call
|
(function_call
|
||||||
|
|
@ -64,4 +64,5 @@
|
||||||
(#any-of? @_method "gmatch" "gsub"))
|
(#any-of? @_method "gmatch" "gsub"))
|
||||||
arguments: (arguments (string content: _ @injection.content (#set! injection.language "luap"))))
|
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"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue