summaryrefslogtreecommitdiff
path: root/lsp.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-30 16:27:31 -0500
committerpommicket <pommicket@gmail.com>2022-12-30 16:27:31 -0500
commit72624969e99d284984614a33cabb4ed9fea31a0a (patch)
tree0339461c7d415a4a8cb7fa894e6306804b9c3739 /lsp.c
parentad841a324e905559ab7640956b0fbe2d2fdb3b77 (diff)
write rename request
Diffstat (limited to 'lsp.c')
-rw-r--r--lsp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lsp.c b/lsp.c
index 875aab2..18b150e 100644
--- a/lsp.c
+++ b/lsp.c
@@ -75,6 +75,9 @@ static void lsp_request_free(LSPRequest *r) {
arr_free(w->added);
arr_free(w->removed);
} break;
+ case LSP_REQUEST_RENAME:
+ free(r->data.rename.new_name);
+ break;
case LSP_REQUEST_WORKSPACE_SYMBOLS:
free(r->data.workspace_symbols.query);
break;
@@ -168,6 +171,8 @@ static bool lsp_supports_request(LSP *lsp, const LSPRequest *request) {
return cap->definition_support;
case LSP_REQUEST_WORKSPACE_SYMBOLS:
return cap->workspace_symbols_support;
+ case LSP_REQUEST_RENAME:
+ return cap->rename_support;
}
assert(0);
return false;
@@ -199,6 +204,7 @@ static bool request_type_is_notification(LSPRequestType type) {
case LSP_REQUEST_SIGNATURE_HELP:
case LSP_REQUEST_HOVER:
case LSP_REQUEST_DEFINITION:
+ case LSP_REQUEST_RENAME:
case LSP_REQUEST_WORKSPACE_SYMBOLS:
case LSP_REQUEST_WORKSPACE_FOLDERS:
return false;