aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Weinberger <pjw@google.com>2019-05-28 09:47:51 -0400
committerPeter Weinberger <pjw@google.com>2019-05-28 15:12:38 +0000
commitd238219cc233110bab5949ee47e1505814ab1197 (patch)
treeb9e434d2790d6f58fd8c577fdadbda712cb0438d
parent1a7b4747f5e90458f2568a3a98335640f9e156fa (diff)
downloadgolang-x-tools-d238219cc233110bab5949ee47e1505814ab1197.tar.gz
internal/lsp: client/registerCapapbility is a request, not a notification
Although they have null responses, client/[un]registerCapability messages are RPCs from golps to the editor, not notifications. (This bug had unknown impact.) Change-Id: I3be2eb30b46f937b8ec29d1668f682b797d84be9 Reviewed-on: https://go-review.googlesource.com/c/tools/+/179157 Reviewed-by: Ian Cottrell <iancottrell@google.com> Run-TryBot: Peter Weinberger <pjw@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-rw-r--r--internal/lsp/protocol/tsclient.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/lsp/protocol/tsclient.go b/internal/lsp/protocol/tsclient.go
index b92f01c7b..b449185f5 100644
--- a/internal/lsp/protocol/tsclient.go
+++ b/internal/lsp/protocol/tsclient.go
@@ -171,11 +171,11 @@ func (s *clientDispatcher) Configuration(ctx context.Context, params *Configurat
}
func (s *clientDispatcher) RegisterCapability(ctx context.Context, params *RegistrationParams) error {
- return s.Conn.Notify(ctx, "client/registerCapability", params) // Notify? (not Call?)
+ return s.Conn.Call(ctx, "client/registerCapability", params, nil) // Call, not Notify
}
func (s *clientDispatcher) UnregisterCapability(ctx context.Context, params *UnregistrationParams) error {
- return s.Conn.Notify(ctx, "client/unregisterCapability", params) // Notify? (not Call?)
+ return s.Conn.Call(ctx, "client/unregisterCapability", params, nil) // Call, not Notify
}
func (s *clientDispatcher) ShowMessageRequest(ctx context.Context, params *ShowMessageRequestParams) (*MessageActionItem, error) {