summaryrefslogtreecommitdiff
path: root/lsp.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-30 10:17:42 -0500
committerpommicket <pommicket@gmail.com>2022-12-30 10:17:42 -0500
commit61db5a1a07f4fbe953d7cab9b6714fe5157a1265 (patch)
treeb06e2590429dcd108bcd00182fbb09cd250a0d38 /lsp.c
parenta0f8332da674d452f7ae4f84f01d4682d464c9b2 (diff)
start workspace/symbol
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 8b147b2..f45603e 100644
--- a/lsp.c
+++ b/lsp.c
@@ -67,6 +67,9 @@ static void lsp_request_free(LSPRequest *r) {
arr_free(w->added);
arr_free(w->removed);
} break;
+ case LSP_REQUEST_WORKSPACE_SYMBOLS:
+ free(r->data.workspace_symbols.query);
+ break;
}
memset(r, 0, sizeof *r);
}
@@ -151,6 +154,8 @@ static bool lsp_supports_request(LSP *lsp, const LSPRequest *request) {
return cap->hover_support;
case LSP_REQUEST_DEFINITION:
return cap->definition_support;
+ case LSP_REQUEST_WORKSPACE_SYMBOLS:
+ return cap->workspace_symbols_support;
}
assert(0);
return false;
@@ -181,6 +186,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_WORKSPACE_SYMBOLS:
case LSP_REQUEST_WORKSPACE_FOLDERS:
return false;
}