[gnome-builder] lsp: implement breaking change from LSP 3
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] lsp: implement breaking change from LSP 3
- Date: Thu, 5 Dec 2019 05:36:36 +0000 (UTC)
commit 90791bbfb7bbcc2cf6974abf4660e2865787566b
Author: Christian Hergert <chergert redhat com>
Date: Wed Dec 4 21:34:37 2019 -0800
lsp: implement breaking change from LSP 3
LSP 3 no longer has a containing "location" node. So instead
we should just check for the Range in the immediate object.
It might be nice to handle things going backwards, but given
how quick the other editors are moving forward, it's probably
more likely that LSPs move forward quickly too.
src/libide/lsp/ide-lsp-symbol-resolver.c | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
---
diff --git a/src/libide/lsp/ide-lsp-symbol-resolver.c b/src/libide/lsp/ide-lsp-symbol-resolver.c
index f7fdf2931..d079234ec 100644
--- a/src/libide/lsp/ide-lsp-symbol-resolver.c
+++ b/src/libide/lsp/ide-lsp-symbol-resolver.c
@@ -389,17 +389,14 @@ ide_lsp_symbol_resolver_document_symbol_cb (GObject *object,
success = JSONRPC_MESSAGE_PARSE (node,
"name", JSONRPC_MESSAGE_GET_STRING (&name),
"kind", JSONRPC_MESSAGE_GET_INT64 (&kind),
- "location", "{",
- "uri", JSONRPC_MESSAGE_GET_STRING (&uri),
- "range", "{",
- "start", "{",
- "line", JSONRPC_MESSAGE_GET_INT64 (&begin.line),
- "character", JSONRPC_MESSAGE_GET_INT64 (&begin.column),
- "}",
- "end", "{",
- "line", JSONRPC_MESSAGE_GET_INT64 (&end.line),
- "character", JSONRPC_MESSAGE_GET_INT64 (&end.column),
- "}",
+ "range", "{",
+ "start", "{",
+ "line", JSONRPC_MESSAGE_GET_INT64 (&begin.line),
+ "character", JSONRPC_MESSAGE_GET_INT64 (&begin.column),
+ "}",
+ "end", "{",
+ "line", JSONRPC_MESSAGE_GET_INT64 (&end.line),
+ "character", JSONRPC_MESSAGE_GET_INT64 (&end.column),
"}",
"}"
);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]