Skip to content

Commit

Permalink
Capture editor.action.triggerSuggest to avoid errors (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
radeksimko authored Nov 18, 2020
1 parent 993400e commit f6a87ec
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions langserver/handlers/execute_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ func (h executeCommandHandlers) Get(name, commandPrefix string) (executeCommandH
}

func (lh *logHandler) WorkspaceExecuteCommand(ctx context.Context, params lsp.ExecuteCommandParams) (interface{}, error) {
if params.Command == "editor.action.triggerSuggest" {
// If this was actually received by the server, it means the client
// does not support explicit suggest triggering, so we fail silently
// TODO: Revisit once https://github.com/microsoft/language-server-protocol/issues/1117 is addressed
return nil, nil
}

commandPrefix, _ := lsctx.CommandPrefix(ctx)
handler, ok := handlers.Get(params.Command, commandPrefix)
if !ok {
Expand Down

0 comments on commit f6a87ec

Please sign in to comment.