Skip to content

Commit

Permalink
feat(treesitter): add go.work support
Browse files Browse the repository at this point in the history
  • Loading branch information
ttys3 committed Apr 20, 2022
1 parent d6be17b commit 269f7a7
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 269f7a7

Please sign in to comment.