Skip to content

Commit aa91891

Browse files
pjweinbgodennypenta
authored andcommitted
gopls/internal/protocol: upgrade to latest LSP
We were on 3.17.6-next.2. This CL brings us up to next.9. Aside from extending the Client and Server types, the change is backwards compatible. There are additional fields in ApplyWorkspaceEditParams, CodeLensClientCapabilities, DiagnosticClientCapabilities, WorkspaceClientCapabilities, WorkspaceOptions. There are new types ClientCodeLensResolveOptions, DiagnosticCapabilities, SnippetTextEdit, TextDocumentContentClientCapabilities, TextDocumentContentOptions, TextDocumentContentParams, TextDocumentContentRefreshParams,TextDocumentContentRegistrationOptions, WorkspaceEditMetadata. There is a new SemanticTokenType "label" (LabelType). Change-Id: I1a7c79252d4726ab4d95bca6c1244a02a7bb62da Reviewed-on: https://go-review.googlesource.com/c/tools/+/626095 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Robert Findley <[email protected]>
1 parent 1b63042 commit aa91891

File tree

10 files changed

+275
-87
lines changed

10 files changed

+275
-87
lines changed

gopls/internal/cmd/cmd.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,10 @@ func newConnection(server protocol.Server, client *cmdClient) *connection {
425425
}
426426
}
427427

428+
func (c *cmdClient) TextDocumentContentRefresh(context.Context, *protocol.TextDocumentContentRefreshParams) error {
429+
return nil
430+
}
431+
428432
func (c *cmdClient) CodeLensRefresh(context.Context) error { return nil }
429433

430434
func (c *cmdClient) FoldingRangeRefresh(context.Context) error { return nil }

gopls/internal/protocol/generate/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const vscodeRepo = "https://github.com/microsoft/vscode-languageserver-node"
3131
// protocol version 3.17.0 (as declared by the metaData.version field).
3232
// (Point releases are reflected in the git tag version even when they are cosmetic
3333
// and don't change the protocol.)
34-
var lspGitRef = "release/protocol/3.17.6-next.2"
34+
var lspGitRef = "release/protocol/3.17.6-next.9"
3535

3636
var (
3737
repodir = flag.String("d", "", "directory containing clone of "+vscodeRepo)

gopls/internal/protocol/generate/output.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func genDecl(model *Model, method string, param, result *Type, dir string) {
8686
}
8787
}
8888

89-
func genCase(model *Model, method string, param, result *Type, dir string) {
89+
func genCase(_ *Model, method string, param, result *Type, dir string) {
9090
out := new(bytes.Buffer)
9191
fmt.Fprintf(out, "\tcase %q:\n", method)
9292
var p string
@@ -128,7 +128,7 @@ func genCase(model *Model, method string, param, result *Type, dir string) {
128128
}
129129
}
130130

131-
func genFunc(model *Model, method string, param, result *Type, dir string, isnotify bool) {
131+
func genFunc(_ *Model, method string, param, result *Type, dir string, isnotify bool) {
132132
out := new(bytes.Buffer)
133133
var p, r string
134134
var goResult string

gopls/internal/protocol/generate/tables.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ var methodNames = map[string]string{
256256
"workspace/inlineValue/refresh": "InlineValueRefresh",
257257
"workspace/semanticTokens/refresh": "SemanticTokensRefresh",
258258
"workspace/symbol": "Symbol",
259+
"workspace/textDocumentContent": "TextDocumentContent",
260+
"workspace/textDocumentContent/refresh": "TextDocumentContentRefresh",
259261
"workspace/willCreateFiles": "WillCreateFiles",
260262
"workspace/willDeleteFiles": "WillDeleteFiles",
261263
"workspace/willRenameFiles": "WillRenameFiles",

gopls/internal/protocol/tsclient.go

Lines changed: 15 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gopls/internal/protocol/tsjson.go

Lines changed: 42 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)