summaryrefslogtreecommitdiff
path: root/lsp.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-09-07 14:38:49 -0400
committerpommicket <pommicket@gmail.com>2023-09-07 14:38:49 -0400
commit815d652b570f53c989f62d0c7db847d7d6dfd940 (patch)
treec977583cfcc5b682a8cee5546bcf3c837014df1b /lsp.c
parentbb4b7774aabc2686f936935b02899b1aa0bf1f2b (diff)
textDocument/publishDiagnostics parsing
Diffstat (limited to 'lsp.c')
-rw-r--r--lsp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lsp.c b/lsp.c
index 5944c29..ec9d3d7 100644
--- a/lsp.c
+++ b/lsp.c
@@ -119,6 +119,11 @@ void lsp_request_free(LSPRequest *r) {
case LSP_REQUEST_DOCUMENT_LINK:
case LSP_REQUEST_CONFIGURATION:
case LSP_REQUEST_DID_OPEN:
+ break;
+ case LSP_REQUEST_PUBLISH_DIAGNOSTICS: {
+ LSPRequestPublishDiagnostics *pub = &r->data.publish_diagnostics;
+ arr_free(pub->diagnostics);
+ } break;
case LSP_REQUEST_SHOW_MESSAGE:
case LSP_REQUEST_LOG_MESSAGE:
case LSP_REQUEST_RENAME:
@@ -209,6 +214,7 @@ static bool lsp_supports_request(LSP *lsp, const LSPRequest *request) {
case LSP_REQUEST_SHOW_MESSAGE:
case LSP_REQUEST_LOG_MESSAGE:
case LSP_REQUEST_WORKSPACE_FOLDERS:
+ case LSP_REQUEST_PUBLISH_DIAGNOSTICS:
return false;
case LSP_REQUEST_INITIALIZE:
case LSP_REQUEST_INITIALIZED:
@@ -268,6 +274,7 @@ static bool request_type_is_notification(LSPRequestType type) {
case LSP_REQUEST_DID_CHANGE:
case LSP_REQUEST_DID_CHANGE_WORKSPACE_FOLDERS:
case LSP_REQUEST_CONFIGURATION:
+ case LSP_REQUEST_PUBLISH_DIAGNOSTICS:
return true;
case LSP_REQUEST_INITIALIZE:
case LSP_REQUEST_SHUTDOWN: