mirror of
https://github.com/helix-editor/helix.git
synced 2025-01-18 13:07:06 +04:00
Add support for textproto language. (#11874)
This commit is contained in:
parent
6373027c9e
commit
3fd7ca334e
@ -204,6 +204,7 @@
|
||||
| task | ✓ | | | |
|
||||
| tcl | ✓ | | ✓ | |
|
||||
| templ | ✓ | | | `templ` |
|
||||
| textproto | ✓ | ✓ | ✓ | |
|
||||
| tfvars | ✓ | | ✓ | `terraform-ls` |
|
||||
| thrift | ✓ | | | |
|
||||
| todotxt | ✓ | | | |
|
||||
|
@ -344,6 +344,19 @@ indent = { tab-width = 2, unit = " " }
|
||||
name = "protobuf"
|
||||
source = { git = "https://github.com/yusdacra/tree-sitter-protobuf", rev = "19c211a01434d9f03efff99f85e19f967591b175"}
|
||||
|
||||
[[language]]
|
||||
name = "textproto"
|
||||
file-types = ["txtpb", "textpb", "textproto"]
|
||||
comment-token = "#"
|
||||
scope = "source.textproto"
|
||||
indent = { tab-width = 2, unit = " " }
|
||||
formatter = { command = "txtpbfmt" }
|
||||
auto-format = true
|
||||
|
||||
[[grammar]]
|
||||
name = "textproto"
|
||||
source = { git = "https://github.com/PorterAtGoogle/tree-sitter-textproto", rev = "568471b80fd8793d37ed01865d8c2208a9fefd1b"}
|
||||
|
||||
[[language]]
|
||||
name = "elixir"
|
||||
scope = "source.elixir"
|
||||
|
22
runtime/queries/textproto/highlights.scm
Normal file
22
runtime/queries/textproto/highlights.scm
Normal file
@ -0,0 +1,22 @@
|
||||
(string) @string
|
||||
|
||||
(field_name) @variable.other.member
|
||||
|
||||
(comment) @comment
|
||||
|
||||
(number) @constant.numeric
|
||||
; covers e.g. booleans and "inf"
|
||||
(scalar_value (identifier)) @constant
|
||||
; Covers "-inf"
|
||||
(scalar_value (signed_identifier)) @constant.numeric
|
||||
|
||||
[
|
||||
(open_squiggly)
|
||||
(close_squiggly)
|
||||
(open_square)
|
||||
(close_square)
|
||||
(open_arrow)
|
||||
(close_arrow)
|
||||
] @punctuation.bracket
|
||||
|
||||
"," @punctuation.delimiter
|
11
runtime/queries/textproto/indents.scm
Normal file
11
runtime/queries/textproto/indents.scm
Normal file
@ -0,0 +1,11 @@
|
||||
[
|
||||
(message_value)
|
||||
(message_list)
|
||||
(scalar_list)
|
||||
] @indent
|
||||
|
||||
[
|
||||
(close_arrow)
|
||||
(close_square)
|
||||
(close_squiggly)
|
||||
] @outdent
|
12
runtime/queries/textproto/textobjects.scm
Normal file
12
runtime/queries/textproto/textobjects.scm
Normal file
@ -0,0 +1,12 @@
|
||||
(message_field
|
||||
(_) @entry.inside) @entry.around
|
||||
|
||||
(scalar_field
|
||||
(_) @entry.inside) @entry.around
|
||||
|
||||
(message_list
|
||||
(_) @entry.around)
|
||||
|
||||
(scalar_list
|
||||
(_) @entry.around)
|
||||
|
Loading…
Reference in New Issue
Block a user