internal/lsp: fix title for vendor suggested fix
Noticed that the message in VS Code is empty.
Change-Id: I5e0c6723be0fc376e2e01a3016127a0385a02866
Reviewed-on: https://go-review.googlesource.com/c/tools/+/272206
Trust: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
diff --git a/internal/lsp/cache/mod_tidy.go b/internal/lsp/cache/mod_tidy.go
index f33d9c3..e77a8c3 100644
--- a/internal/lsp/cache/mod_tidy.go
+++ b/internal/lsp/cache/mod_tidy.go
@@ -180,6 +180,7 @@
Message: `Inconsistent vendoring detected. Please re-run "go mod vendor".
See https://github.com/golang/go/issues/39164 for more detail on this issue.`,
SuggestedFixes: []source.SuggestedFix{{
+ Title: source.CommandVendor.Title,
Command: &protocol.Command{
Command: source.CommandVendor.ID(),
Title: source.CommandVendor.Title,
diff --git a/internal/lsp/code_action.go b/internal/lsp/code_action.go
index 35fccea..9987eab 100644
--- a/internal/lsp/code_action.go
+++ b/internal/lsp/code_action.go
@@ -515,13 +515,6 @@
Edits: edits,
})
}
- if fix.Command != nil {
- action.Command = &protocol.Command{
- Command: fix.Command.Command,
- Title: fix.Command.Title,
- Arguments: fix.Command.Arguments,
- }
- }
quickFixes = append(quickFixes, action)
}
}