diff options
| author | Amaan Qureshi <amaanq12@gmail.com> | 2023-02-23 18:44:10 -0500 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2023-02-24 01:14:47 -0800 |
| commit | c38646edf2bdfac157ca619697ecad9ea87fd469 (patch) | |
| tree | 6251c7cffebc3b2836ff65eced2aa088a5110ac9 | |
| parent | style: fill in missing code docs wherever applicable (diff) | |
| download | nvim-treesitter-0.8.5.tar nvim-treesitter-0.8.5.tar.gz nvim-treesitter-0.8.5.tar.bz2 nvim-treesitter-0.8.5.tar.lz nvim-treesitter-0.8.5.tar.xz nvim-treesitter-0.8.5.tar.zst nvim-treesitter-0.8.5.zip | |
feat: add cponv0.8.5
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | lockfile.json | 3 | ||||
| -rw-r--r-- | lua/nvim-treesitter/parsers.lua | 8 | ||||
| -rw-r--r-- | queries/cpon/folds.scm | 5 | ||||
| -rw-r--r-- | queries/cpon/highlights.scm | 45 | ||||
| -rw-r--r-- | queries/cpon/indents.scm | 23 | ||||
| -rw-r--r-- | queries/cpon/injections.scm | 1 | ||||
| -rw-r--r-- | queries/cpon/locals.scm | 7 |
8 files changed, 93 insertions, 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] [commonlisp](https://github.com/theHamsta/tree-sitter-commonlisp) (maintained by @theHamsta) - [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] [css](https://github.com/tree-sitter/tree-sitter-css) (maintained by @TravonteD) - [x] [cuda](https://github.com/theHamsta/tree-sitter-cuda) (maintained by @theHamsta) diff --git a/lockfile.json b/lockfile.json index 1b9623cdb..f2815bff0 100644 --- a/lockfile.json +++ b/lockfile.json @@ -53,6 +53,9 @@ "cooklang": { "revision": "5e113412aadb78955c27010daa4dbe1d202013cf" }, + "cpon": { + "revision": "b894a70f883d2cb7505b87a9d84a189fe8cd1982" + }, "cpp": { "revision": "66262d3e76eb2046c76e6d661a6b72664bfb5819" }, diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 1813f08dd..7b18ce7c6 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -220,6 +220,14 @@ list.cooklang = { maintainers = { "@addcninblue" }, } +list.cpon = { + install_info = { + url = "https://github.com/amaanq/tree-sitter-cpon", + files = { "src/parser.c" }, + }, + maintainers = { "@amaanq" }, +} + list.cpp = { install_info = { url = "https://github.com/tree-sitter/tree-sitter-cpp", diff --git a/queries/cpon/folds.scm b/queries/cpon/folds.scm new file mode 100644 index 000000000..02feec4e1 --- /dev/null +++ b/queries/cpon/folds.scm @@ -0,0 +1,5 @@ +[ + (meta_map) + (map) + (array) +] @fold diff --git a/queries/cpon/highlights.scm b/queries/cpon/highlights.scm new file mode 100644 index 000000000..f08647293 --- /dev/null +++ b/queries/cpon/highlights.scm @@ -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 diff --git a/queries/cpon/indents.scm b/queries/cpon/indents.scm new file mode 100644 index 000000000..477ea83b5 --- /dev/null +++ b/queries/cpon/indents.scm @@ -0,0 +1,23 @@ +[ + (meta_map) + (map) + (imap) + (array) +] @indent + +[ + "]" + "}" + ">" +] @indent_end + +[ "{" "}" ] @branch + +[ "[" "]" ] @branch + +[ "<" ">" ] @branch + +[ + (ERROR) + (comment) +] @auto diff --git a/queries/cpon/injections.scm b/queries/cpon/injections.scm new file mode 100644 index 000000000..4bb7d675d --- /dev/null +++ b/queries/cpon/injections.scm @@ -0,0 +1 @@ +(comment) @comment diff --git a/queries/cpon/locals.scm b/queries/cpon/locals.scm new file mode 100644 index 000000000..c1854af91 --- /dev/null +++ b/queries/cpon/locals.scm @@ -0,0 +1,7 @@ +[ + (document) + + (meta_map) + (map) + (array) +] @scope |
