mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-15 18:00:07 -04:00
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>
This commit is contained in:
parent
f9034812d8
commit
b4f6dd7298
7 changed files with 43 additions and 0 deletions
5
queries/textproto/folds.scm
Normal file
5
queries/textproto/folds.scm
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
[
|
||||
(message_value)
|
||||
(scalar_list)
|
||||
(message_list)
|
||||
] @fold
|
||||
18
queries/textproto/highlights.scm
Normal file
18
queries/textproto/highlights.scm
Normal file
|
|
@ -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
|
||||
7
queries/textproto/indents.scm
Normal file
7
queries/textproto/indents.scm
Normal file
|
|
@ -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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue