mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
parent
3b8c2ea492
commit
e4083fc8e1
47 changed files with 126 additions and 3 deletions
|
|
@ -167,6 +167,10 @@ Mainly for markup languages.
|
|||
@text.title
|
||||
@text.literal
|
||||
@text.uri
|
||||
|
||||
@text.note
|
||||
@text.warning
|
||||
@text.danger
|
||||
```
|
||||
|
||||
#### Tags
|
||||
|
|
|
|||
|
|
@ -136,6 +136,7 @@ We are looking for maintainers to add more parsers and to write query files for
|
|||
- [x] [c](https://github.com/tree-sitter/tree-sitter-c) (maintained by @vigoux)
|
||||
- [x] [c_sharp](https://github.com/tree-sitter/tree-sitter-c-sharp) (maintained by @svermeulen)
|
||||
- [x] [clojure](https://github.com/sogaiu/tree-sitter-clojure) (maintained by @sogaiu)
|
||||
- [x] [comment](https://github.com/stsewd/tree-sitter-comment) (maintained by @stsewd)
|
||||
- [x] [cpp](https://github.com/tree-sitter/tree-sitter-cpp) (maintained by @theHamsta)
|
||||
- [x] [css](https://github.com/tree-sitter/tree-sitter-css) (maintained by @TravonteD)
|
||||
- [x] [dart](https://github.com/UserNobody14/tree-sitter-dart) (maintained by @Akin909)
|
||||
|
|
|
|||
|
|
@ -514,7 +514,7 @@ TODO: docs
|
|||
|
||||
`TSNumber`
|
||||
*hl-TSNumber*
|
||||
For all numbers
|
||||
For all numbers
|
||||
|
||||
`TSOperator`
|
||||
*hl-TSOperator*
|
||||
|
|
@ -576,6 +576,11 @@ Tag delimiter like `<` `>` `/`
|
|||
*hl-TSText*
|
||||
For strings considered text in a markup language.
|
||||
|
||||
`TSStrong`
|
||||
*hl-TSSTrong*
|
||||
|
||||
For text to be represented in bold.
|
||||
|
||||
`TSEmphasis`
|
||||
*hl-TSEmphasis*
|
||||
For text to be represented with emphasis.
|
||||
|
|
@ -600,6 +605,18 @@ Literal text.
|
|||
*hl-TSURI*
|
||||
Any URI like a link or email.
|
||||
|
||||
`TSNote`
|
||||
*hl-TSNote*
|
||||
Text representation of an informational note.
|
||||
|
||||
`TSWarning`
|
||||
*TSWarning*
|
||||
Text representation of a warning note.
|
||||
|
||||
`TSDanger`
|
||||
*TSDanger*
|
||||
Text representation of a danger note.
|
||||
|
||||
`TSType`
|
||||
*hl-TSType*
|
||||
For types.
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@
|
|||
"clojure": {
|
||||
"revision": "f09652f095be878df8a87a57dcbfa07094316253"
|
||||
},
|
||||
"comment": {
|
||||
"revision": "6b0dbd56284023617c3ea755624e55d0254f813a"
|
||||
},
|
||||
"cpp": {
|
||||
"revision": "3bfe046f3967fef92ebb33f8cd58c3ff373d5e56"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -85,6 +85,10 @@ hlmap["text.title"] = "TSTitle"
|
|||
hlmap["text.literal"] = "TSLiteral"
|
||||
hlmap["text.uri"] = "TSURI"
|
||||
|
||||
hlmap["text.note"] = "TSNote"
|
||||
hlmap["text.warning"] = "TSWarning"
|
||||
hlmap["text.danger"] = "TSDanger"
|
||||
|
||||
hlmap["type"] = "TSType"
|
||||
hlmap["type.builtin"] = "TSTypeBuiltin"
|
||||
|
||||
|
|
|
|||
|
|
@ -403,6 +403,14 @@ list.regex = {
|
|||
maintainers = {"@theHamsta"},
|
||||
}
|
||||
|
||||
list.comment = {
|
||||
install_info = {
|
||||
url = "https://github.com/stsewd/tree-sitter-comment",
|
||||
files = { "src/parser.c", "src/scanner.c" },
|
||||
},
|
||||
maintainers = {"@stsewd"},
|
||||
}
|
||||
|
||||
list.jsdoc = {
|
||||
install_info = {
|
||||
url = "https://github.com/tree-sitter/tree-sitter-jsdoc",
|
||||
|
|
|
|||
|
|
@ -80,5 +80,9 @@ highlight default link TSTitle Title
|
|||
highlight default link TSLiteral String
|
||||
highlight default link TSURI Underlined
|
||||
|
||||
highlight default link TSNote SpecialComment
|
||||
highlight default link TSWarning Todo
|
||||
highlight default link TSDanger WarningMsg
|
||||
|
||||
highlight default link TSTag Label
|
||||
highlight default link TSTagDelimiter Delimiter
|
||||
|
|
|
|||
1
queries/bash/injections.scm
Normal file
1
queries/bash/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(comment) @comment
|
||||
|
|
@ -1 +1,3 @@
|
|||
(preproc_arg) @c
|
||||
|
||||
(comment) @comment
|
||||
|
|
|
|||
1
queries/c_sharp/injections.scm
Normal file
1
queries/c_sharp/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(comment) @comment
|
||||
1
queries/clojure/injections.scm
Normal file
1
queries/clojure/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(comment) @comment
|
||||
19
queries/comment/highlights.scm
Normal file
19
queries/comment/highlights.scm
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[
|
||||
"("
|
||||
")"
|
||||
] @punctuation.bracket
|
||||
|
||||
":" @punctuation.delimiter
|
||||
|
||||
(tag (name) @text.note (user)? @constant)
|
||||
|
||||
((tag ((name) @text.warning))
|
||||
(#match? @text.warning "^(TODO|HACK|WARNING)$"))
|
||||
|
||||
((tag ((name) @text.danger))
|
||||
(#match? @text.danger "^(FIXME|XXX|BUG)$"))
|
||||
|
||||
; Issue number (#123)
|
||||
("text" @number (#match? @number "^#[0-9]+$"))
|
||||
; User mention (@user)
|
||||
("text" @constant (#match? @constant "^[@][a-zA-Z0-9_-]+$"))
|
||||
|
|
@ -1 +1,3 @@
|
|||
(preproc_arg) @cpp
|
||||
|
||||
(comment) @comment
|
||||
|
|
|
|||
1
queries/css/injections.scm
Normal file
1
queries/css/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(comment) @comment
|
||||
1
queries/dart/injections.scm
Normal file
1
queries/dart/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(comment) @comment
|
||||
1
queries/devicetree/injections.scm
Normal file
1
queries/devicetree/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(comment) @comment
|
||||
1
queries/fennel/injections.scm
Normal file
1
queries/fennel/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(comment) @comment
|
||||
1
queries/gdscript/injections.scm
Normal file
1
queries/gdscript/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(comment) @comment
|
||||
1
queries/go/injections.scm
Normal file
1
queries/go/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(comment) @comment
|
||||
1
queries/graphql/injections.scm
Normal file
1
queries/graphql/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(comment) @comment
|
||||
|
|
@ -8,3 +8,5 @@
|
|||
|
||||
((script_element
|
||||
(raw_text) @javascript))
|
||||
|
||||
(comment) @comment
|
||||
|
|
|
|||
1
queries/java/injections.scm
Normal file
1
queries/java/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(comment) @comment
|
||||
1
queries/jsonc/injections.scm
Normal file
1
queries/jsonc/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(comment) @comment
|
||||
|
|
@ -1,2 +1,4 @@
|
|||
((triple_string) @markdown
|
||||
(#offset! @markdown 0 3 0 -3))
|
||||
|
||||
(comment) @comment
|
||||
|
|
|
|||
1
queries/kotlin/injections.scm
Normal file
1
queries/kotlin/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(comment) @comment
|
||||
1
queries/ledger/injections.scm
Normal file
1
queries/ledger/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(comment) @comment
|
||||
|
|
@ -8,3 +8,5 @@
|
|||
|
||||
(#eq? @_cdef_identifier "cdef")
|
||||
)
|
||||
|
||||
(comment) @comment
|
||||
|
|
|
|||
1
queries/nix/injections.scm
Normal file
1
queries/nix/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(comment) @comment
|
||||
1
queries/ocaml/injections.scm
Normal file
1
queries/ocaml/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(comment) @comment
|
||||
1
queries/ocaml_interface/injections.scm
Normal file
1
queries/ocaml_interface/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
; inherits: ocaml
|
||||
|
|
@ -1 +1,3 @@
|
|||
((ocaml) @ocaml)
|
||||
(ocaml) @ocaml
|
||||
|
||||
(comment) @comment
|
||||
|
|
|
|||
|
|
@ -1 +1,3 @@
|
|||
((text) @html)
|
||||
(text) @html
|
||||
|
||||
(comment) @comment
|
||||
|
|
|
|||
|
|
@ -22,3 +22,5 @@
|
|||
; Attribute docstring
|
||||
(((expression_statement (assignment)) . (expression_statement (string) @rst))
|
||||
(#offset! @rst 0 3 0 -3))
|
||||
|
||||
(comment) @comment
|
||||
|
|
|
|||
5
queries/ql/injections.scm
Normal file
5
queries/ql/injections.scm
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
[
|
||||
(line_comment)
|
||||
(block_comment)
|
||||
(qldoc)
|
||||
] @comment
|
||||
|
|
@ -2,3 +2,5 @@
|
|||
name: (identifier) @_name
|
||||
parameters: (parameters (string) @regex))
|
||||
(#match? @_name "^#?(not-)?(match|vim-match|lua-match)$"))
|
||||
|
||||
(comment) @comment
|
||||
|
|
|
|||
|
|
@ -58,3 +58,5 @@
|
|||
"interpreted_text" @latex
|
||||
(role) @_role)
|
||||
(#eq? @_role ":math:"))
|
||||
|
||||
(comment) @comment
|
||||
|
|
|
|||
1
queries/ruby/injections.scm
Normal file
1
queries/ruby/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(comment) @comment
|
||||
|
|
@ -5,3 +5,8 @@
|
|||
(macro_rule
|
||||
left: (token_tree_pattern) @rust
|
||||
right: (token_tree) @rust))
|
||||
|
||||
[
|
||||
(line_comment)
|
||||
(block_comment)
|
||||
] @comment
|
||||
|
|
|
|||
1
queries/sparql/injections.scm
Normal file
1
queries/sparql/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(comment) @comment
|
||||
4
queries/supercollider/injections.scm
Normal file
4
queries/supercollider/injections.scm
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
[
|
||||
(line_comment)
|
||||
(block_comment)
|
||||
] @comment
|
||||
|
|
@ -19,3 +19,5 @@
|
|||
(raw_text) @typescript)
|
||||
(#match? @_lang "(ts|typescript)")
|
||||
)
|
||||
|
||||
(comment) @comment
|
||||
|
|
|
|||
|
|
@ -8,3 +8,5 @@
|
|||
|
||||
(#eq? @_cdef_identifier "cdef")
|
||||
)
|
||||
|
||||
(comment) @comment
|
||||
|
|
|
|||
1
queries/toml/injections.scm
Normal file
1
queries/toml/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(comment) @comment
|
||||
1
queries/turtle/injections.scm
Normal file
1
queries/turtle/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(comment) @comment
|
||||
1
queries/verilog/injections.scm
Normal file
1
queries/verilog/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(comment) @comment
|
||||
|
|
@ -17,3 +17,5 @@
|
|||
|
||||
((interpolation
|
||||
(raw_text) @javascript))
|
||||
|
||||
(comment) @comment
|
||||
|
|
|
|||
1
queries/yaml/injections.scm
Normal file
1
queries/yaml/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(comment) @comment
|
||||
Loading…
Add table
Add a link
Reference in a new issue