diff options
author | pommicket <pommicket@gmail.com> | 2023-01-03 17:29:19 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-01-03 17:29:19 -0500 |
commit | 87c8bd6eb27edb4bfc539967235c3a1e2f8d77e4 (patch) | |
tree | 4dbcb24ce4fca226e5b70bc5f01d71158d891426 /lsp-write.c | |
parent | 0d92c03f3998fe4d16f3ba928d3a94583755e1ce (diff) |
go to declaration
Diffstat (limited to 'lsp-write.c')
-rw-r--r-- | lsp-write.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lsp-write.c b/lsp-write.c index ecb8527..691bcba 100644 --- a/lsp-write.c +++ b/lsp-write.c @@ -1,5 +1,6 @@ #define LSP_INTERNAL 1 #include "lsp.h" +#include "util.h" #define write_bool lsp_write_bool // prevent naming conflict @@ -278,6 +279,8 @@ static const char *lsp_request_method(LSPRequest *request) { return "textDocument/references"; case LSP_REQUEST_DEFINITION: return "textDocument/definition"; + case LSP_REQUEST_DECLARATION: + return "textDocument/declaration"; case LSP_REQUEST_HIGHLIGHT: return "textDocument/documentHighlight"; case LSP_REQUEST_RENAME: @@ -545,7 +548,8 @@ void write_request(LSP *lsp, LSPRequest *request) { write_document_position(o, hover->position); write_obj_end(o); } break; - case LSP_REQUEST_DEFINITION: { + case LSP_REQUEST_DEFINITION: + case LSP_REQUEST_DECLARATION: { const LSPRequestDefinition *def = &request->data.definition; write_key_obj_start(o, "params"); write_document_position(o, def->position); |