adds missing tree-sitter-comment injection for js/ts (#2763)
This commit is contained in:
parent
55f4f69515
commit
cad4e03a00
2 changed files with 15 additions and 2 deletions
|
@ -22,7 +22,15 @@
|
||||||
((regex_pattern) @injection.content
|
((regex_pattern) @injection.content
|
||||||
(#set! injection.language "regex"))
|
(#set! injection.language "regex"))
|
||||||
|
|
||||||
; Parse JSDoc annotations in comments
|
; Parse JSDoc annotations in multiline comments
|
||||||
|
|
||||||
((comment) @injection.content
|
((comment) @injection.content
|
||||||
(#set! injection.language "jsdoc"))
|
(#set! injection.language "jsdoc")
|
||||||
|
(#match? @injection.content "^/\\*+"))
|
||||||
|
|
||||||
|
; Parse general tags in single line comments
|
||||||
|
|
||||||
|
((comment) @injection.content
|
||||||
|
(#set! injection.language "comment")
|
||||||
|
(#match? @injection.content "^//"))
|
||||||
|
|
||||||
|
|
5
runtime/queries/jsdoc/injections.scm
Normal file
5
runtime/queries/jsdoc/injections.scm
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
; Parse general comment tags
|
||||||
|
|
||||||
|
((document) @injection.content
|
||||||
|
(#set! injection.include-children)
|
||||||
|
(#set! injection.language "comment"))
|
Loading…
Add table
Reference in a new issue