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"