diff options
| author | Amaan Qureshi <amaanq12@gmail.com> | 2023-02-03 10:14:13 -0500 |
|---|---|---|
| committer | ObserverOfTime <chronobserver@disroot.org> | 2023-02-03 20:38:40 +0200 |
| commit | 98a52ce300d2f8ba3bf7838e08396d829aaef078 (patch) | |
| tree | dea45d5b184d0a146fb7ac89d92bbf8b5482003c | |
| parent | Update parsers: bash, func, markdown, markdown_inline, sql, v (diff) | |
| download | nvim-treesitter-98a52ce300d2f8ba3bf7838e08396d829aaef078.tar nvim-treesitter-98a52ce300d2f8ba3bf7838e08396d829aaef078.tar.gz nvim-treesitter-98a52ce300d2f8ba3bf7838e08396d829aaef078.tar.bz2 nvim-treesitter-98a52ce300d2f8ba3bf7838e08396d829aaef078.tar.lz nvim-treesitter-98a52ce300d2f8ba3bf7838e08396d829aaef078.tar.xz nvim-treesitter-98a52ce300d2f8ba3bf7838e08396d829aaef078.tar.zst nvim-treesitter-98a52ce300d2f8ba3bf7838e08396d829aaef078.zip | |
feat: add gosum
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | lockfile.json | 3 | ||||
| -rw-r--r-- | lua/nvim-treesitter/parsers.lua | 9 | ||||
| -rw-r--r-- | queries/gosum/highlights.scm | 33 |
4 files changed, 46 insertions, 0 deletions
@@ -224,6 +224,7 @@ We are looking for maintainers to add more parsers and to write query files for - [x] [go](https://github.com/tree-sitter/tree-sitter-go) (maintained by @theHamsta, @WinWisely268) - [x] [Godot Resources (gdresource)](https://github.com/PrestonKnopp/tree-sitter-godot-resource) (maintained by @pierpo) - [x] [gomod](https://github.com/camdencheek/tree-sitter-go-mod) (maintained by @camdencheek) +- [x] [gosum](https://github.com/amaanq/tree-sitter-go-sum) (maintained by @amaanq) - [x] [gowork](https://github.com/omertuc/tree-sitter-go-work) (maintained by @omertuc) - [x] [graphql](https://github.com/bkegley/tree-sitter-graphql) (maintained by @bkegley) - [ ] [hack](https://github.com/slackhq/tree-sitter-hack) diff --git a/lockfile.json b/lockfile.json index f30f58862..8a533d83b 100644 --- a/lockfile.json +++ b/lockfile.json @@ -155,6 +155,9 @@ "gomod": { "revision": "4a65743dbc2bb3094114dd2b43da03c820aa5234" }, + "gosum": { + "revision": "68974b63c19dc6e27214a5c76b6e26c0c40fe5b7" + }, "gowork": { "revision": "949a8a470559543857a62102c84700d291fc984c" }, diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index f5eab6a58..fdae248d8 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -534,6 +534,15 @@ list.gomod = { filetype = "gomod", } +list.gosum = { + install_info = { + url = "https://github.com/amaanq/tree-sitter-go-sum", + files = { "src/parser.c" }, + }, + maintainers = { "@amaanq" }, + filetype = "gosum", +} + list.gowork = { install_info = { url = "https://github.com/omertuc/tree-sitter-go-work", diff --git a/queries/gosum/highlights.scm b/queries/gosum/highlights.scm new file mode 100644 index 000000000..d19dde45a --- /dev/null +++ b/queries/gosum/highlights.scm @@ -0,0 +1,33 @@ +[ + "alpha" + "beta" + "dev" + "pre" + "rc" + "+incompatible" +] @keyword + +[ + (module_path) + (hash) +] @string + +(base_version) @string.special + +(hash_version) @symbol + +[ + (number) + (number_with_decimal) + (hex_number) +] @number + +(checksum + "go.mod" @string) + +[ + ":" + "." + "-" + "/" +] @punctuation.delimiter |
