From a3ffdb855da8b7a7b2c961bfb0fcfa4e3200e952 Mon Sep 17 00:00:00 2001 From: Josh Elsasser Date: Mon, 21 May 2018 16:14:54 -0700 Subject: [PATCH] Return a standards-compliant :textDocument/documentHighlight reply Prevents an editor's language server client from choking on a JSON RPC reply with unexpected arguments. There appear to be no current users of this protocol extension, so removing it shouldn't cause any regressions. Fixes #682. --- src/messages/text_document_document_highlight.cc | 1 - src/symbol.h | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/messages/text_document_document_highlight.cc b/src/messages/text_document_document_highlight.cc index 93b78242e..5276d289c 100644 --- a/src/messages/text_document_document_highlight.cc +++ b/src/messages/text_document_document_highlight.cc @@ -54,7 +54,6 @@ struct Handler_TextDocumentDocumentHighlight highlight.kind = lsDocumentHighlightKind::Read; else highlight.kind = lsDocumentHighlightKind::Text; - highlight.role = use.role; out.result.push_back(highlight); } }); diff --git a/src/symbol.h b/src/symbol.h index bcbc6c64d..997a2422b 100644 --- a/src/symbol.h +++ b/src/symbol.h @@ -74,11 +74,8 @@ struct lsDocumentHighlight { // The highlight kind, default is DocumentHighlightKind.Text. lsDocumentHighlightKind kind = lsDocumentHighlightKind::Text; - - // cquery extension - Role role = Role::None; }; -MAKE_REFLECT_STRUCT(lsDocumentHighlight, range, kind, role); +MAKE_REFLECT_STRUCT(lsDocumentHighlight, range, kind); struct lsSymbolInformation { std::string_view name;