Skip to content

Commit 0334d3b

Browse files
committed
Support comment injection
1 parent f8c1d6f commit 0334d3b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

languages/emmylua/injections.scm

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
;; Injections for Lua code
22

3+
((comment) @injection.content
4+
(#set! injection.language "comment")
5+
)
6+
37
;; EmmyLua Doc comments injection
48
;; Inject --- comments as emmyluadoc language
59
;; The emmyluadoc grammar now supports --- prefix, so we can directly inject
6-
((comment) @injection.content
7-
(#match? @injection.content "^---")
8-
(#set! injection.language "emmyluadoc"))
10+
11+
(((comment) @_emmyluadoc_comment
12+
(#match? @_emmyluadoc_comment "^---")) @injection.content
13+
(#set! injection.language "emmyluadoc"))
914

1015
;; LuaJIT FFI C code injection
1116
((function_call

0 commit comments

Comments
 (0)