@@ -143,7 +143,11 @@ func (s *server) Symbol(_ context.Context, _ *protocol.WorkspaceSymbolParams) ([
143
143
144
144
// CodeLens is required by the protocol.Server interface.
145
145
func (s * server ) CodeLens (_ context.Context , _ * protocol.CodeLensParams ) ([]protocol.CodeLens , error ) {
146
- return nil , notImplemented ("CodeLens" )
146
+ // As of version 0.4.0 of gopls it is not possible to instruct the language
147
+ // client to stop asking for Code Lenses and Document Links. To prevent
148
+ // VS Code from showing error messages, this feature is implemented by
149
+ // returning empty values.
150
+ return nil , nil
147
151
}
148
152
149
153
// ResolveCodeLens is required by the protocol.Server interface.
@@ -173,7 +177,11 @@ func (s *server) Rename(_ context.Context, _ *protocol.RenameParams) (*protocol.
173
177
174
178
// DocumentLink is required by the protocol.Server interface.
175
179
func (s * server ) DocumentLink (_ context.Context , _ * protocol.DocumentLinkParams ) ([]protocol.DocumentLink , error ) {
176
- return nil , notImplemented ("DocumentLink" )
180
+ // As of version 0.4.0 of gopls it is not possible to instruct the language
181
+ // client to stop asking for Code Lenses and Document Links. To prevent
182
+ // VS Code from showing error messages, this feature is implemented by
183
+ // returning empty values.
184
+ return nil , nil
177
185
}
178
186
179
187
// ResolveDocumentLink is required by the protocol.Server interface.
0 commit comments