feat: add protobuf tree-sitter parser with highlighting queries

imgbot
Yusuf Bera Ertan 3 years ago committed by Blaž Hrastnik
parent 1158fc4487
commit 4b45f27a13

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

@ -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"

@ -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…
Cancel
Save