зеркало из https://github.com/golang/tools.git
gopls/internal/settings: rename goTest code action to source.test
Change-Id: I0ef0285cd35e32d259a7dc0bb9712ff61d99f3f6 Reviewed-on: https://go-review.googlesource.com/c/tools/+/604795 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Findley <rfindley@google.com>
This commit is contained in:
Родитель
dfcdf50220
Коммит
e104dc835a
|
@ -80,6 +80,18 @@ for the current selection.
|
||||||
recognized by gopls that enables corresponding logic in the
|
recognized by gopls that enables corresponding logic in the
|
||||||
server's ApplyFix command handler. -->
|
server's ApplyFix command handler. -->
|
||||||
|
|
||||||
|
<!-- The source.test ("Run this test") code action (not a
|
||||||
|
transformation) runs the selected test. However, it is not
|
||||||
|
offered by default because:
|
||||||
|
(a) VS Code has a richer test UX (with richer ones to come--see
|
||||||
|
https://github.com/golang/vscode-go/issues/1641) and
|
||||||
|
(b) LSP has no good way to display the streaming output of a test
|
||||||
|
in the client's natural UX (see last paragraph of first note
|
||||||
|
of https://github.com/golang/go/issues/67400).
|
||||||
|
It is only offered when the "only" field includes kind source.test.
|
||||||
|
Should it be documented? If so, where?
|
||||||
|
-->
|
||||||
|
|
||||||
Caveats:
|
Caveats:
|
||||||
- Many of gopls code transformations are limited by Go's syntax tree
|
- Many of gopls code transformations are limited by Go's syntax tree
|
||||||
representation, which currently records comments not in the tree
|
representation, which currently records comments not in the tree
|
||||||
|
|
|
@ -80,6 +80,6 @@ const (
|
||||||
GoAssembly protocol.CodeActionKind = "source.assembly"
|
GoAssembly protocol.CodeActionKind = "source.assembly"
|
||||||
GoDoc protocol.CodeActionKind = "source.doc"
|
GoDoc protocol.CodeActionKind = "source.doc"
|
||||||
GoFreeSymbols protocol.CodeActionKind = "source.freesymbols"
|
GoFreeSymbols protocol.CodeActionKind = "source.freesymbols"
|
||||||
GoTest protocol.CodeActionKind = "goTest" // TODO(adonovan): rename "source.test"
|
GoTest protocol.CodeActionKind = "source.test"
|
||||||
GoplsDocFeatures protocol.CodeActionKind = "gopls.doc.features"
|
GoplsDocFeatures protocol.CodeActionKind = "gopls.doc.features"
|
||||||
)
|
)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче