mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat: add cpon
This commit is contained in:
parent
853b1ab39a
commit
c38646edf2
8 changed files with 93 additions and 0 deletions
|
|
@ -191,6 +191,7 @@ We are looking for maintainers to add more parsers and to write query files for
|
||||||
- [x] [comment](https://github.com/stsewd/tree-sitter-comment) (maintained by @stsewd)
|
- [x] [comment](https://github.com/stsewd/tree-sitter-comment) (maintained by @stsewd)
|
||||||
- [x] [commonlisp](https://github.com/theHamsta/tree-sitter-commonlisp) (maintained by @theHamsta)
|
- [x] [commonlisp](https://github.com/theHamsta/tree-sitter-commonlisp) (maintained by @theHamsta)
|
||||||
- [x] [cooklang](https://github.com/addcninblue/tree-sitter-cooklang) (maintained by @addcninblue)
|
- [x] [cooklang](https://github.com/addcninblue/tree-sitter-cooklang) (maintained by @addcninblue)
|
||||||
|
- [x] [cpon](https://github.com/amaanq/tree-sitter-cpon) (maintained by @amaanq)
|
||||||
- [x] [cpp](https://github.com/tree-sitter/tree-sitter-cpp) (maintained by @theHamsta)
|
- [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] [css](https://github.com/tree-sitter/tree-sitter-css) (maintained by @TravonteD)
|
||||||
- [x] [cuda](https://github.com/theHamsta/tree-sitter-cuda) (maintained by @theHamsta)
|
- [x] [cuda](https://github.com/theHamsta/tree-sitter-cuda) (maintained by @theHamsta)
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,9 @@
|
||||||
"cooklang": {
|
"cooklang": {
|
||||||
"revision": "5e113412aadb78955c27010daa4dbe1d202013cf"
|
"revision": "5e113412aadb78955c27010daa4dbe1d202013cf"
|
||||||
},
|
},
|
||||||
|
"cpon": {
|
||||||
|
"revision": "b894a70f883d2cb7505b87a9d84a189fe8cd1982"
|
||||||
|
},
|
||||||
"cpp": {
|
"cpp": {
|
||||||
"revision": "66262d3e76eb2046c76e6d661a6b72664bfb5819"
|
"revision": "66262d3e76eb2046c76e6d661a6b72664bfb5819"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -220,6 +220,14 @@ list.cooklang = {
|
||||||
maintainers = { "@addcninblue" },
|
maintainers = { "@addcninblue" },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
list.cpon = {
|
||||||
|
install_info = {
|
||||||
|
url = "https://github.com/amaanq/tree-sitter-cpon",
|
||||||
|
files = { "src/parser.c" },
|
||||||
|
},
|
||||||
|
maintainers = { "@amaanq" },
|
||||||
|
}
|
||||||
|
|
||||||
list.cpp = {
|
list.cpp = {
|
||||||
install_info = {
|
install_info = {
|
||||||
url = "https://github.com/tree-sitter/tree-sitter-cpp",
|
url = "https://github.com/tree-sitter/tree-sitter-cpp",
|
||||||
|
|
|
||||||
5
queries/cpon/folds.scm
Normal file
5
queries/cpon/folds.scm
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
[
|
||||||
|
(meta_map)
|
||||||
|
(map)
|
||||||
|
(array)
|
||||||
|
] @fold
|
||||||
45
queries/cpon/highlights.scm
Normal file
45
queries/cpon/highlights.scm
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
; Literals
|
||||||
|
|
||||||
|
(string) @string
|
||||||
|
(escape_sequence) @string.escape
|
||||||
|
|
||||||
|
(hex_blob
|
||||||
|
"x" @character.special
|
||||||
|
(_) @string)
|
||||||
|
|
||||||
|
(esc_blob
|
||||||
|
"b" @character.special
|
||||||
|
(_) @string)
|
||||||
|
|
||||||
|
(datetime
|
||||||
|
"d" @character.special
|
||||||
|
(_) @string.special)
|
||||||
|
|
||||||
|
(number) @number
|
||||||
|
|
||||||
|
(float) @float
|
||||||
|
|
||||||
|
(boolean) @boolean
|
||||||
|
|
||||||
|
(null) @constant.builtin
|
||||||
|
|
||||||
|
; Punctuation
|
||||||
|
|
||||||
|
[
|
||||||
|
","
|
||||||
|
":"
|
||||||
|
] @punctuation.delimiter
|
||||||
|
|
||||||
|
[ "{" "}" ] @punctuation.bracket
|
||||||
|
|
||||||
|
[ "[" "]" ] @punctuation.bracket
|
||||||
|
|
||||||
|
[ "<" ">" ] @punctuation.bracket
|
||||||
|
|
||||||
|
; Comments
|
||||||
|
|
||||||
|
(comment) @comment @spell
|
||||||
|
|
||||||
|
; Errors
|
||||||
|
|
||||||
|
(ERROR) @error
|
||||||
23
queries/cpon/indents.scm
Normal file
23
queries/cpon/indents.scm
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
[
|
||||||
|
(meta_map)
|
||||||
|
(map)
|
||||||
|
(imap)
|
||||||
|
(array)
|
||||||
|
] @indent
|
||||||
|
|
||||||
|
[
|
||||||
|
"]"
|
||||||
|
"}"
|
||||||
|
">"
|
||||||
|
] @indent_end
|
||||||
|
|
||||||
|
[ "{" "}" ] @branch
|
||||||
|
|
||||||
|
[ "[" "]" ] @branch
|
||||||
|
|
||||||
|
[ "<" ">" ] @branch
|
||||||
|
|
||||||
|
[
|
||||||
|
(ERROR)
|
||||||
|
(comment)
|
||||||
|
] @auto
|
||||||
1
queries/cpon/injections.scm
Normal file
1
queries/cpon/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
(comment) @comment
|
||||||
7
queries/cpon/locals.scm
Normal file
7
queries/cpon/locals.scm
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
[
|
||||||
|
(document)
|
||||||
|
|
||||||
|
(meta_map)
|
||||||
|
(map)
|
||||||
|
(array)
|
||||||
|
] @scope
|
||||||
Loading…
Add table
Add a link
Reference in a new issue