Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions crates/languages/src/c/injections.scm
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
((comment) @injection.content
(#set! injection.language "comment")
)

(preproc_def
value: (preproc_arg) @injection.content
(#set! injection.language "c"))
Expand Down
4 changes: 4 additions & 0 deletions crates/languages/src/cpp/injections.scm
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
((comment) @injection.content
(#set! injection.language "comment")
)

(preproc_def
value: (preproc_arg) @injection.content
(#set! injection.language "c++"))
Expand Down
4 changes: 4 additions & 0 deletions crates/languages/src/gitcommit/injections.scm
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
((comment) @content
(#set! injection.language "comment")
)

((scissors) @content
(#set! "language" "diff"))

Expand Down
4 changes: 4 additions & 0 deletions crates/languages/src/go/injections.scm
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
; Refer to https://github.com/nvim-treesitter/nvim-treesitter/blob/master/queries/go/injections.scm#L4C1-L16C41
((comment) @injection.content
(#set! injection.language "comment")
)

(call_expression
(selector_expression) @_function
(#any-of? @_function
Expand Down
4 changes: 4 additions & 0 deletions crates/languages/src/javascript/injections.scm
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
((comment) @injection.content
(#set! injection.language "comment")
)

(((comment) @_jsdoc_comment
(#match? @_jsdoc_comment "(?s)^/[*][*][^*].*[*]/$")) @injection.content
(#set! injection.language "jsdoc"))
Expand Down
4 changes: 4 additions & 0 deletions crates/languages/src/markdown/injections.scm
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
((comment) @injection.content
(#set! injection.language "comment")
)

(fenced_code_block
(info_string
(language) @injection.language)
Expand Down
4 changes: 4 additions & 0 deletions crates/languages/src/rust/injections.scm
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
((comment) @injection.content
(#set! injection.language "comment")
)

(macro_invocation
macro: (identifier) @_macro_name
(#not-any-of? @_macro_name "view" "html")
Expand Down
4 changes: 4 additions & 0 deletions crates/languages/src/tsx/injections.scm
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
((comment) @injection.content
(#set! injection.language "comment")
)

(((comment) @_jsdoc_comment
(#match? @_jsdoc_comment "(?s)^/[*][*][^*].*[*]/$")) @injection.content
(#set! injection.language "jsdoc"))
Expand Down
4 changes: 4 additions & 0 deletions crates/languages/src/typescript/injections.scm
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
((comment) @injection.content
(#set! injection.language "comment")
)

(((comment) @_jsdoc_comment
(#match? @_jsdoc_comment "(?s)^/[*][*][^*].*[*]/$")) @injection.content
(#set! injection.language "jsdoc"))
Expand Down
4 changes: 4 additions & 0 deletions extensions/html/languages/html/injections.scm
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
((comment) @injection.content
(#set! injection.language "comment")
)

(script_element
(raw_text) @injection.content
(#set! injection.language "javascript"))
Expand Down
Loading