summaryrefslogtreecommitdiff
path: root/lsp-write.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-30 21:49:05 -0500
committerpommicket <pommicket@gmail.com>2022-12-30 21:49:05 -0500
commitf69275faee4cd3045389a98fefefb0c683757a5c (patch)
treec7b0e5cfe59205554e3b5fc5410d3bff9fe89599 /lsp-write.c
parenta997d4106a397c785473bec5862c91bdf49f06ee (diff)
start document highlights
Diffstat (limited to 'lsp-write.c')
-rw-r--r--lsp-write.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lsp-write.c b/lsp-write.c
index fb65c2d..3255ec0 100644
--- a/lsp-write.c
+++ b/lsp-write.c
@@ -273,6 +273,8 @@ static const char *lsp_request_method(LSPRequest *request) {
return "textDocument/hover";
case LSP_REQUEST_DEFINITION:
return "textDocument/definition";
+ case LSP_REQUEST_HIGHLIGHT:
+ return "textDocument/documentHighlight";
case LSP_REQUEST_RENAME:
return "textDocument/rename";
case LSP_REQUEST_WORKSPACE_FOLDERS:
@@ -544,6 +546,12 @@ static void write_request(LSP *lsp, LSPRequest *request) {
write_document_position(o, def->position);
write_obj_end(o);
} break;
+ case LSP_REQUEST_HIGHLIGHT: {
+ const LSPRequestHighlight *hl = &request->data.highlight;
+ write_key_obj_start(o, "params");
+ write_document_position(o, hl->position);
+ write_obj_end(o);
+ } break;
case LSP_REQUEST_RENAME: {
const LSPRequestRename *rename = &request->data.rename;
write_key_obj_start(o, "params");