Skip to content

Commit

Permalink
all: add support for go.work files as go.mod files
Browse files Browse the repository at this point in the history
This will allow us to add support for the go.work proposal.

Change-Id: I13b374ede724a5a10f0ad11b1073d7849226a4bf
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/341849
Trust: Rebecca Stambler <[email protected]>
Run-TryBot: Rebecca Stambler <[email protected]>
TryBot-Result: kokoro <[email protected]>
Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
  • Loading branch information
stamblerre committed Aug 13, 2021
1 parent 0ff533d commit ad3a6ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@
"id": "go.mod",
"extensions": [
"go.mod",
"gopls.mod"
"gopls.mod",
"go.work"
],
"aliases": [
"Go Module File"
Expand Down
3 changes: 2 additions & 1 deletion src/goLanguageServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,8 @@ export async function buildLanguageClient(cfg: BuildLanguageClientOption): Promi
// gopls handles only file URIs.
{ language: 'go', scheme: 'file' },
{ language: 'go.mod', scheme: 'file' },
{ language: 'go.sum', scheme: 'file' }
{ language: 'go.sum', scheme: 'file' },
{ language: 'go.work', scheme: 'file' }
];

// Let gopls know about .tmpl - this is experimental, so enable it only in the experimental mode now.
Expand Down

0 comments on commit ad3a6ca

Please sign in to comment.