mirror of
https://github.com/nvim-treesitter/nvim-treesitter
synced 2024-09-16 14:34:05 +02:00
feat: more comment injections
This commit is contained in:
parent
8dd40c7609
commit
9d68e876cc
56 changed files with 157 additions and 3 deletions
2
queries/ada/injections.scm
Normal file
2
queries/ada/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
2
queries/agda/injections.scm
Normal file
2
queries/agda/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
5
queries/apex/injections.scm
Normal file
5
queries/apex/injections.scm
Normal file
|
@ -0,0 +1,5 @@
|
|||
([
|
||||
(line_comment)
|
||||
(block_comment)
|
||||
] @injection.content
|
||||
(#set! injection.language "comment"))
|
2
queries/bibtex/injections.scm
Normal file
2
queries/bibtex/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((junk) @injection.content
|
||||
(#set! injection.language "comment"))
|
2
queries/blueprint/injections.scm
Normal file
2
queries/blueprint/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
5
queries/cmake/injections.scm
Normal file
5
queries/cmake/injections.scm
Normal file
|
@ -0,0 +1,5 @@
|
|||
([
|
||||
(bracket_comment)
|
||||
(line_comment)
|
||||
] @injection.content
|
||||
(#set! injection.language "comment"))
|
5
queries/commonlisp/injections.scm
Normal file
5
queries/commonlisp/injections.scm
Normal file
|
@ -0,0 +1,5 @@
|
|||
([
|
||||
(comment)
|
||||
(block_comment)
|
||||
] @injection.content
|
||||
(#set! injection.language "comment"))
|
|
@ -1,5 +1,7 @@
|
|||
(metadata) @comment
|
||||
|
||||
(comment) @comment @spell
|
||||
|
||||
(ingredient
|
||||
"@" @punctuation.delimiter
|
||||
(name)? @string.special.symbol
|
||||
|
|
2
queries/cooklang/injections.scm
Normal file
2
queries/cooklang/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
2
queries/corn/injections.scm
Normal file
2
queries/corn/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
|
@ -1,3 +1,6 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
(code_block
|
||||
(language) @injection.language
|
||||
(code) @injection.content)
|
||||
|
|
2
queries/ebnf/injections.scm
Normal file
2
queries/ebnf/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
2
queries/erlang/injections.scm
Normal file
2
queries/erlang/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
|
@ -1,3 +1,6 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
; Pass code blocks to Cpp highlighter
|
||||
(code
|
||||
(code_body) @injection.content
|
||||
|
|
2
queries/fortran/injections.scm
Normal file
2
queries/fortran/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
2
queries/fsh/injections.scm
Normal file
2
queries/fsh/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((fsh_comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
2
queries/func/injections.scm
Normal file
2
queries/func/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
5
queries/fusion/injections.scm
Normal file
5
queries/fusion/injections.scm
Normal file
|
@ -0,0 +1,5 @@
|
|||
([
|
||||
(comment)
|
||||
(afx_comment)
|
||||
] @injection.content
|
||||
(#set! injection.language "comment"))
|
|
@ -1,3 +1,6 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
((operation
|
||||
(command) @_command
|
||||
(message) @injection.content)
|
||||
|
|
2
queries/gitignore/injections.scm
Normal file
2
queries/gitignore/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
2
queries/glimmer/injections.scm
Normal file
2
queries/glimmer/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment_statement) @injection.content
|
||||
(#set! injection.language "comment"))
|
5
queries/hack/injections.scm
Normal file
5
queries/hack/injections.scm
Normal file
|
@ -0,0 +1,5 @@
|
|||
([
|
||||
(comment)
|
||||
(heredoc)
|
||||
] @injection.content
|
||||
(#set! injection.language "comment"))
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
(aura) @constant.builtin
|
||||
|
||||
(Gap) @comment
|
||||
(lineComment) @comment
|
||||
|
||||
(boolean) @constant.builtin
|
||||
|
||||
|
|
2
queries/hoon/injections.scm
Normal file
2
queries/hoon/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((lineComment) @injection.content
|
||||
(#set! injection.language "comment"))
|
|
@ -1,3 +1,9 @@
|
|||
([
|
||||
(paired_comment)
|
||||
(unpaired_comment)
|
||||
] @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
((content) @injection.content
|
||||
(#set! injection.language "html")
|
||||
(#set! injection.combined))
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
; injections.scm
|
||||
((json_value) @injection.content
|
||||
(#set! injection.language "json"))
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
(exec
|
||||
(string) @injection.content
|
||||
(#set! injection.language "bash"))
|
||||
|
|
2
queries/ini/injections.scm
Normal file
2
queries/ini/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
2
queries/jsonnet/injections.scm
Normal file
2
queries/jsonnet/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
|
@ -1,3 +1,6 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
; The right side of =~ literals
|
||||
(regex_literal
|
||||
(_) @injection.content
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
|
||||
(bool) @boolean
|
||||
|
||||
(comment) @comment
|
||||
(comment) @comment @spell
|
||||
|
||||
(regexp) @string.regexp
|
||||
|
||||
|
|
2
queries/liquidsoap/injections.scm
Normal file
2
queries/liquidsoap/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
2
queries/llvm/injections.scm
Normal file
2
queries/llvm/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
|
@ -1,2 +1,9 @@
|
|||
([
|
||||
(comment)
|
||||
(line_comment)
|
||||
(ocaml_comment)
|
||||
] @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
((ocaml) @injection.content
|
||||
(#set! injection.language "ocaml"))
|
||||
|
|
2
queries/mermaid/injections.scm
Normal file
2
queries/mermaid/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
2
queries/mlir/injections.scm
Normal file
2
queries/mlir/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
2
queries/nickel/injections.scm
Normal file
2
queries/nickel/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
2
queries/ninja/injections.scm
Normal file
2
queries/ninja/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
5
queries/prisma/injections.scm
Normal file
5
queries/prisma/injections.scm
Normal file
|
@ -0,0 +1,5 @@
|
|||
([
|
||||
(comment)
|
||||
(developer_comment)
|
||||
] @injection.content
|
||||
(#set! injection.language "comment"))
|
|
@ -1,3 +1,6 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
((label_value) @injection.content
|
||||
(#set! injection.language "regex")
|
||||
(#offset! @injection.content 0 1 0 -1))
|
||||
|
|
2
queries/proto/injections.scm
Normal file
2
queries/proto/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
|
@ -1,3 +1,6 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
((javascript) @injection.content
|
||||
(#set! injection.language "javascript"))
|
||||
|
||||
|
|
5
queries/robot/injections.scm
Normal file
5
queries/robot/injections.scm
Normal file
|
@ -0,0 +1,5 @@
|
|||
([
|
||||
(comment)
|
||||
(extra_text)
|
||||
] @injection.content
|
||||
(#set! injection.language "comment"))
|
2
queries/scss/injections.scm
Normal file
2
queries/scss/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((single_line_comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
5
queries/smithy/injections.scm
Normal file
5
queries/smithy/injections.scm
Normal file
|
@ -0,0 +1,5 @@
|
|||
([
|
||||
(comment)
|
||||
(documentation_comment)
|
||||
] @injection.content
|
||||
(#set! injection.language "comment"))
|
2
queries/solidity/injections.scm
Normal file
2
queries/solidity/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
5
queries/swift/injections.scm
Normal file
5
queries/swift/injections.scm
Normal file
|
@ -0,0 +1,5 @@
|
|||
([
|
||||
(comment)
|
||||
(multiline_comment)
|
||||
] @injection.content
|
||||
(#set! injection.language "comment"))
|
2
queries/tcl/injections.scm
Normal file
2
queries/tcl/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
(field_name) @variable.member
|
||||
|
||||
(comment) @comment
|
||||
(comment) @comment @spell
|
||||
|
||||
(number) @number
|
||||
|
||||
|
|
2
queries/textproto/injections.scm
Normal file
2
queries/textproto/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
|
@ -1,3 +1,6 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
((content) @injection.content
|
||||
(#set! injection.language "html")
|
||||
(#set! injection.combined))
|
||||
|
|
2
queries/usd/injections.scm
Normal file
2
queries/usd/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
2
queries/vala/injections.scm
Normal file
2
queries/vala/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
2
queries/vhs/injections.scm
Normal file
2
queries/vhs/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
5
queries/wgsl/injections.scm
Normal file
5
queries/wgsl/injections.scm
Normal file
|
@ -0,0 +1,5 @@
|
|||
([
|
||||
(line_comment)
|
||||
(block_comment)
|
||||
] @injection.content
|
||||
(#set! injection.language "comment"))
|
2
queries/wing/injections.scm
Normal file
2
queries/wing/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
Loading…
Reference in a new issue