From 269f7a7c47976a5933806d2e298ee40eddc57b58 Mon Sep 17 00:00:00 2001 From: ttyS3 Date: Wed, 20 Apr 2022 22:13:47 +0800 Subject: [PATCH] feat(treesitter): add go.work support --- languages.toml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/languages.toml b/languages.toml index abdac19bea44..91c73572f7b8 100644 --- a/languages.toml +++ b/languages.toml @@ -277,14 +277,27 @@ roots = [] auto-format = true comment-token = "//" language-server = { command = "gopls" } -# TODO: gopls needs utf-8 offsets? indent = { tab-width = 4, unit = "\t" } -grammar = "gomod" [[grammar]] name = "gomod" source = { git = "https://github.com/camdencheek/tree-sitter-go-mod", rev = "e8f51f8e4363a3d9a427e8f63f4c1bbc5ef5d8d0" } +[[language]] +name = "gowork" +scope = "source.gowork" +injection-regex = "gowork" +file-types = ["go.work"] +roots = [] +auto-format = true +comment-token = "//" +language-server = { command = "gopls" } +indent = { tab-width = 4, unit = "\t" } + +[[grammar]] +name = "gowork" +source = { git = "https://github.com/omertuc/tree-sitter-go-work", rev = "6dd9dd79fb51e9f2abc829d5e97b15015b6a8ae2" } + [[language]] name = "javascript" scope = "source.js"