adds missing tree-sitter-comment injection for js/ts (#2763)

This commit is contained in:
farwyler 2022-06-20 17:55:51 +02:00 committed by GitHub
parent 55f4f69515
commit cad4e03a00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 2 deletions

View file

@ -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 "^//"))

View file

@ -0,0 +1,5 @@
; Parse general comment tags
((document) @injection.content
(#set! injection.include-children)
(#set! injection.language "comment"))