mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 09:26:19 +04:00
feat: add protobuf tree-sitter parser with highlighting queries
This commit is contained in:
parent
1158fc4487
commit
4b45f27a13
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -98,3 +98,7 @@
|
||||
path = helix-syntax/languages/tree-sitter-ledger
|
||||
url = https://github.com/cbarrete/tree-sitter-ledger
|
||||
shallow = true
|
||||
[submodule "helix-syntax/languages/tree-sitter-protobuf"]
|
||||
path = helix-syntax/languages/tree-sitter-protobuf
|
||||
url = https://github.com/yusdacra/tree-sitter-protobuf.git
|
||||
shallow = true
|
||||
|
1
helix-syntax/languages/tree-sitter-protobuf
Submodule
1
helix-syntax/languages/tree-sitter-protobuf
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit a835f2568a8a8cbb7d9c02f2e8bcf98efa745d4e
|
@ -30,6 +30,16 @@ comment-token = "#"
|
||||
|
||||
indent = { tab-width = 2, unit = " " }
|
||||
|
||||
[[language]]
|
||||
name = "protobuf"
|
||||
scope = "source.proto"
|
||||
injection-regex = "protobuf"
|
||||
file-types = ["proto"]
|
||||
roots = []
|
||||
comment-token = "//"
|
||||
|
||||
indent = { tab-width = 2, unit = " " }
|
||||
|
||||
[[language]]
|
||||
name = "elixir"
|
||||
scope = "source.elixir"
|
||||
|
60
runtime/queries/protobuf/highlights.scm
Normal file
60
runtime/queries/protobuf/highlights.scm
Normal file
@ -0,0 +1,60 @@
|
||||
[
|
||||
"syntax"
|
||||
"package"
|
||||
"option"
|
||||
"import"
|
||||
"service"
|
||||
"rpc"
|
||||
"returns"
|
||||
"message"
|
||||
"enum"
|
||||
"oneof"
|
||||
"repeated"
|
||||
"reserved"
|
||||
"to"
|
||||
"stream"
|
||||
"extend"
|
||||
] @keyword
|
||||
|
||||
[
|
||||
(keyType)
|
||||
(type)
|
||||
] @type.builtin
|
||||
|
||||
[
|
||||
(mapName)
|
||||
(oneofName)
|
||||
(enumName)
|
||||
(messageName)
|
||||
(extendName)
|
||||
(serviceName)
|
||||
(rpcName)
|
||||
] @type
|
||||
|
||||
[
|
||||
(fieldName)
|
||||
(optionName)
|
||||
] @property
|
||||
(enumVariantName) @type.enum.variant
|
||||
|
||||
(fullIdent) @namespace
|
||||
|
||||
[
|
||||
(intLit)
|
||||
(floatLit)
|
||||
] @number
|
||||
(boolLit) @constant.builtin
|
||||
(strLit) @string
|
||||
|
||||
(constant) @constant
|
||||
|
||||
(comment) @comment
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
Loading…
Reference in New Issue
Block a user