summaryrefslogtreecommitdiff
path: root/lsp-write.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-01-03 18:01:04 -0500
committerpommicket <pommicket@gmail.com>2023-01-03 18:01:04 -0500
commitc0397f1f4c80e73a2e4ccd1946703fe6a5bb405e (patch)
tree5b95649c140083e2af4332bb92260842436f22c9 /lsp-write.c
parent87c8bd6eb27edb4bfc539967235c3a1e2f8d77e4 (diff)
go to type definition
Diffstat (limited to 'lsp-write.c')
-rw-r--r--lsp-write.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lsp-write.c b/lsp-write.c
index 691bcba..48229c8 100644
--- a/lsp-write.c
+++ b/lsp-write.c
@@ -281,6 +281,10 @@ static const char *lsp_request_method(LSPRequest *request) {
return "textDocument/definition";
case LSP_REQUEST_DECLARATION:
return "textDocument/declaration";
+ case LSP_REQUEST_TYPE_DEFINITION:
+ return "textDocument/typeDefinition";
+ case LSP_REQUEST_IMPLEMENTATION:
+ return "textDocument/implementation";
case LSP_REQUEST_HIGHLIGHT:
return "textDocument/documentHighlight";
case LSP_REQUEST_RENAME:
@@ -549,7 +553,9 @@ void write_request(LSP *lsp, LSPRequest *request) {
write_obj_end(o);
} break;
case LSP_REQUEST_DEFINITION:
- case LSP_REQUEST_DECLARATION: {
+ case LSP_REQUEST_DECLARATION:
+ case LSP_REQUEST_TYPE_DEFINITION:
+ case LSP_REQUEST_IMPLEMENTATION: {
const LSPRequestDefinition *def = &request->data.definition;
write_key_obj_start(o, "params");
write_document_position(o, def->position);