@@ -143,7 +143,11 @@ func (s *server) Symbol(_ context.Context, _ *protocol.WorkspaceSymbolParams) ([
143143
144144// CodeLens is required by the protocol.Server interface.
145145func (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
147151}
148152
149153// ResolveCodeLens is required by the protocol.Server interface.
@@ -173,7 +177,11 @@ func (s *server) Rename(_ context.Context, _ *protocol.RenameParams) (*protocol.
173177
174178// DocumentLink is required by the protocol.Server interface.
175179func (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
177185}
178186
179187// ResolveDocumentLink is required by the protocol.Server interface.
0 commit comments