1
0
mirror of https://github.com/golang/go synced 2024-11-18 15:44:41 -07:00

internal/lsp: send client expected rename provider

This change sends the expected boolean value for 'renameProvider'
to the client.

When a client does not send 'prepareSupport' in its initial
'initialize' request, the client expects to get a boolean value for
'renameProvider'. Since we do not yet provide prepare support, we just
set 'renameProvider' to true regardless of the value of prepareSupport.

Fixes golang/go#32703

Change-Id: I1103e51e1a2927b98aaedf2839996e9cd7f7cbcc
Reviewed-on: https://go-review.googlesource.com/c/tools/+/183259
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
This commit is contained in:
Suzy Mueller 2019-06-20 11:29:44 -04:00
parent 431033348d
commit 494e18b268
2 changed files with 2 additions and 4 deletions

View File

@ -70,9 +70,7 @@ func (s *Server) initialize(ctx context.Context, params *protocol.InitializePara
DocumentHighlightProvider: true,
DocumentLinkProvider: &protocol.DocumentLinkOptions{},
ReferencesProvider: true,
RenameProvider: &protocol.RenameOptions{
PrepareProvider: false,
},
RenameProvider: true,
SignatureHelpProvider: &protocol.SignatureHelpOptions{
TriggerCharacters: []string{"(", ","},
},

View File

@ -1533,7 +1533,7 @@ type ServerCapabilities struct {
* specified if the client states that it supports
* `prepareSupport` in its initial `initialize` request.
*/
RenameProvider *RenameOptions `json:"renameProvider,omitempty"` // boolean | RenameOptions
RenameProvider interface{} `json:"renameProvider,omitempty"` // boolean | RenameOptions
/*DocumentLinkProvider defined:
* The server provides document link support.