1
0
mirror of https://github.com/golang/go synced 2024-10-01 03:18:33 -06:00
go/internal/lsp/cache
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
..
builtin.go internal/lsp: support running go mod tidy as a code action 2019-09-20 13:08:46 +00:00
cache.go internal/lsp: support running go mod tidy as a code action 2019-09-20 13:08:46 +00:00
check.go internal/lsp: make sure that deps are only checked in trimmed mode 2019-09-19 22:30:14 +00:00
external.go internal/lsp: support running go mod tidy as a code action 2019-09-20 13:08:46 +00:00
file.go internal/lsp: support running go mod tidy as a code action 2019-09-20 13:08:46 +00:00
gofile.go internal/lsp: support running go mod tidy as a code action 2019-09-20 13:08:46 +00:00
load.go internal/lsp: support running go mod tidy as a code action 2019-09-20 13:08:46 +00:00
modfile.go internal/lsp: support running go mod tidy as a code action 2019-09-20 13:08:46 +00:00
parse.go internal/lsp: fix infinite recursion while fixing AST 2019-09-19 16:27:28 +00:00
pkg.go internal/lsp: make sure that deps are only checked in trimmed mode 2019-09-19 22:30:14 +00:00
session.go internal/lsp: support running go mod tidy as a code action 2019-09-20 13:08:46 +00:00
sumfile.go internal/lsp: support running go mod tidy as a code action 2019-09-20 13:08:46 +00:00
token.go internal/lsp: unlabel context, log errors when canceled 2019-08-20 20:39:21 +00:00
view.go internal/lsp: support running go mod tidy as a code action 2019-09-20 13:08:46 +00:00
watcher.go internal/lsp: fix deadlocks loading lots of files at once 2019-07-03 17:22:52 +00:00