1
0
mirror of https://github.com/golang/go synced 2024-10-01 05:18:33 -06:00
go/internal
Rebecca Stambler 1081e67f6b internal/lsp: support running go mod tidy as a code action
This changes adds basic support for running `go mod tidy` as a code
action when a user opens a go.mod file. When we have a command
available like `go mod tidy -check`, we will be able to return edits as
part of the codeAction. For now, we execute the command directly.

This change also required a few modifications to our handling of file
kinds so that we could distinguish between a Go file and a go.mod file.

Change-Id: I343079b8886724b67f90a314e45639545a34f21e
Reviewed-on: https://go-review.googlesource.com/c/tools/+/196322
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-09-20 13:08:46 +00:00
..
apidiff all: fix more typos 2019-09-11 15:13:14 +00:00
fastwalk internal/fastwalk: avoid slice bounds out of range for long file names 2018-11-12 23:16:31 +00:00
gopathwalk internal/imports: skip scanned module cache dirs 2019-08-29 21:03:13 +00:00
imports internal/imports: don't prefix stdlib package with std/ 2019-09-18 19:29:07 +00:00
jsonrpc2 all: fix more typos 2019-09-11 15:13:14 +00:00
lsp internal/lsp: support running go mod tidy as a code action 2019-09-20 13:08:46 +00:00
memoize internal/memoize: changes to only one handle per key 2019-09-17 14:40:27 +00:00
module imports: stop using go/packages for modules 2019-01-22 20:29:12 +00:00
semver go/packages: add name= query 2018-10-16 20:20:09 +00:00
span internal/span: handle escaping file URIs 2019-09-16 17:14:20 +00:00
telemetry all: fix more typos 2019-09-11 15:13:14 +00:00
testenv internal/testenv: handle GOPACKAGESDRIVER=off in NeedsGopackage 2019-09-12 15:29:09 +00:00
tool tools/internal/tool: refactor tool.Main() for testabilty 2019-09-19 22:27:22 +00:00
txtar imports: stop using go/packages for modules 2019-01-22 20:29:12 +00:00
xcontext internal/lsp: stop making background contexts everywhere 2019-07-11 16:38:52 +00:00