From 3b05ef44927cc245d2c68873d0a526592d3f93cd Mon Sep 17 00:00:00 2001 From: Omer Tuchfeld Date: Thu, 16 Dec 2021 22:40:06 +0100 Subject: Add support for new golang `go.work` files The new golang 1.18 version (currently in beta) [introduced](https://github.com/golang/go/issues/45713) a new file type called `go.work`. This commit adds support for the syntax of that file using the https://github.com/omertuc/tree-sitter-go-work repository That repository is heavily based on previous work in the https://github.com/camdencheek/tree-sitter-go-mod repository, with a few minor changes to make it work on the very similar `go.work` files. --- lua/nvim-treesitter/parsers.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lua') diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 57280e82..304166ef 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -184,6 +184,16 @@ list.gomod = { filetype = "gomod", } +list.gowork = { + install_info = { + url = "https://github.com/omertuc/tree-sitter-go-work", + branch = "main", + files = { "src/parser.c" }, + }, + maintainers = { "@omertuc" }, + filetype = "gowork", +} + list.graphql = { install_info = { url = "https://github.com/bkegley/tree-sitter-graphql", -- cgit v1.2.3