summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrey Wood <treyw@squareup.com>2023-08-02 11:54:53 -0600
committerGitHub <noreply@github.com>2023-08-02 13:54:53 -0400
commit8968a3a5417eecaea7b39134b089763902e14add (patch)
tree6177e4ef34ac16a6e640c44212e8cc07c44734e3
parentfix(t32): correct gitlab URL (diff)
downloadnvim-treesitter-8968a3a5417eecaea7b39134b089763902e14add.tar
nvim-treesitter-8968a3a5417eecaea7b39134b089763902e14add.tar.gz
nvim-treesitter-8968a3a5417eecaea7b39134b089763902e14add.tar.bz2
nvim-treesitter-8968a3a5417eecaea7b39134b089763902e14add.tar.lz
nvim-treesitter-8968a3a5417eecaea7b39134b089763902e14add.tar.xz
nvim-treesitter-8968a3a5417eecaea7b39134b089763902e14add.tar.zst
nvim-treesitter-8968a3a5417eecaea7b39134b089763902e14add.zip
feat!: change upstream proto parser and improve highlights
-rw-r--r--README.md2
-rw-r--r--lockfile.json2
-rw-r--r--lua/nvim-treesitter/parsers.lua4
-rw-r--r--queries/proto/highlights.scm29
4 files changed, 25 insertions, 12 deletions
diff --git a/README.md b/README.md
index 263da5605..64cbf72b9 100644
--- a/README.md
+++ b/README.md
@@ -306,7 +306,7 @@ We are looking for maintainers to add more parsers and to write query files for
- [x] [pony](https://github.com/amaanq/tree-sitter-pony) (maintained by @amaanq, @mfelsche)
- [x] [prisma](https://github.com/victorhqc/tree-sitter-prisma) (maintained by @elianiva)
- [x] [promql](https://github.com/MichaHoffmann/tree-sitter-promql) (maintained by @MichaHoffmann)
-- [x] [proto](https://github.com/mitchellh/tree-sitter-proto) (maintained by @fsouza)
+- [x] [proto](https://github.com/treywood/tree-sitter-proto) (maintained by @treywood)
- [x] [prql](https://github.com/PRQL/tree-sitter-prql) (maintained by @matthias-Q)
- [x] [pug](https://github.com/zealot128/tree-sitter-pug) (experimental, maintained by @zealot128)
- [x] [puppet](https://github.com/amaanq/tree-sitter-puppet) (maintained by @amaanq)
diff --git a/lockfile.json b/lockfile.json
index 109486fbf..3670f5a53 100644
--- a/lockfile.json
+++ b/lockfile.json
@@ -399,7 +399,7 @@
"revision": "ed9a12f6ae4e75d4622adef8fb1b1e4d0ac0a759"
},
"proto": {
- "revision": "42d82fa18f8afe59b5fc0b16c207ee4f84cb185f"
+ "revision": "4f5450ca84ffc1bff6c604f061276729cf184f40"
},
"prql": {
"revision": "09e158cd3650581c0af4c49c2e5b10c4834c8646"
diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua
index fc2bad86c..6ac8be998 100644
--- a/lua/nvim-treesitter/parsers.lua
+++ b/lua/nvim-treesitter/parsers.lua
@@ -1198,10 +1198,10 @@ list.promql = {
list.proto = {
install_info = {
- url = "https://github.com/mitchellh/tree-sitter-proto",
+ url = "https://github.com/treywood/tree-sitter-proto",
files = { "src/parser.c" },
},
- maintainers = { "@fsouza" },
+ maintainers = { "@treywood" },
}
list.prql = {
diff --git a/queries/proto/highlights.scm b/queries/proto/highlights.scm
index a24314834..e869b87e0 100644
--- a/queries/proto/highlights.scm
+++ b/queries/proto/highlights.scm
@@ -1,19 +1,31 @@
[
- "syntax"
- "option"
- "service"
- "rpc"
- "returns"
- "message"
"enum"
+ "extend"
+ "extensions"
+ "message"
"oneof"
- "optional"
- "repeated"
+ "option"
"reserved"
+ "service"
+ "syntax"
"to"
] @keyword
[
+ "rpc"
+] @keyword.function
+
+[
+ "returns"
+] @keyword.return
+
+[
+ "optional"
+ "repeated"
+ "required"
+] @type.qualifier
+
+[
"package"
"import"
] @include
@@ -34,6 +46,7 @@
[
(string)
"\"proto3\""
+ "\"proto2\""
] @string
(int_lit) @number