From d238219cc233110bab5949ee47e1505814ab1197 Mon Sep 17 00:00:00 2001 From: Peter Weinberger Date: Tue, 28 May 2019 09:47:51 -0400 Subject: [PATCH] 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 Run-TryBot: Peter Weinberger TryBot-Result: Gobot Gobot --- internal/lsp/protocol/tsclient.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/lsp/protocol/tsclient.go b/internal/lsp/protocol/tsclient.go index b92f01c7b9f..b449185f500 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) {