diff options
| author | PorterAtGoogle <70230577+PorterAtGoogle@users.noreply.github.com> | 2023-09-18 10:26:02 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-19 01:26:02 +0900 |
| commit | b4f6dd72980607a9821d24502b0ca7ee826376af (patch) | |
| tree | c6e90c12315b6767225e987e7b11c52276b2719a /queries/textproto | |
| parent | Update README (#5419) (diff) | |
| download | nvim-treesitter-b4f6dd72980607a9821d24502b0ca7ee826376af.tar nvim-treesitter-b4f6dd72980607a9821d24502b0ca7ee826376af.tar.gz nvim-treesitter-b4f6dd72980607a9821d24502b0ca7ee826376af.tar.bz2 nvim-treesitter-b4f6dd72980607a9821d24502b0ca7ee826376af.tar.lz nvim-treesitter-b4f6dd72980607a9821d24502b0ca7ee826376af.tar.xz nvim-treesitter-b4f6dd72980607a9821d24502b0ca7ee826376af.tar.zst nvim-treesitter-b4f6dd72980607a9821d24502b0ca7ee826376af.zip | |
feat(textproto): Add Textproto parser and queries (#5402)
* Add textproto parser and queries
* remove extra newline
* Apply suggestions from code review
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
---------
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
Diffstat (limited to 'queries/textproto')
| -rw-r--r-- | queries/textproto/folds.scm | 5 | ||||
| -rw-r--r-- | queries/textproto/highlights.scm | 18 | ||||
| -rw-r--r-- | queries/textproto/indents.scm | 7 |
3 files changed, 30 insertions, 0 deletions
diff --git a/queries/textproto/folds.scm b/queries/textproto/folds.scm new file mode 100644 index 000000000..f6eeead9a --- /dev/null +++ b/queries/textproto/folds.scm @@ -0,0 +1,5 @@ +[ + (message_value) + (scalar_list) + (message_list) +] @fold diff --git a/queries/textproto/highlights.scm b/queries/textproto/highlights.scm new file mode 100644 index 000000000..8ebb476e5 --- /dev/null +++ b/queries/textproto/highlights.scm @@ -0,0 +1,18 @@ +(string) @string + +(field_name) @field + +(comment) @comment + +(number) @number +; For stuff like "inf" and "-inf". +(scalar_value [ (identifier) (signed_identifier) ]) @number + +[ + (open_squiggly) + (close_squiggly) + (open_square) + (close_square) + (open_arrow) + (close_arrow) +] @punctuation.bracket diff --git a/queries/textproto/indents.scm b/queries/textproto/indents.scm new file mode 100644 index 000000000..fd6db7ffb --- /dev/null +++ b/queries/textproto/indents.scm @@ -0,0 +1,7 @@ +(message_value) @indent.begin +(message_value (close_squiggly) @indent.branch) + +(scalar_list) @indent.begin +(scalar_list (close_square) @indent.branch) +(message_list) @indent.begin +(message_list (close_square) @indent.branch) |
