diff options
author | pommicket <pommicket@gmail.com> | 2023-09-07 14:38:49 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-09-07 14:38:49 -0400 |
commit | 815d652b570f53c989f62d0c7db847d7d6dfd940 (patch) | |
tree | c977583cfcc5b682a8cee5546bcf3c837014df1b /lsp-write.c | |
parent | bb4b7774aabc2686f936935b02899b1aa0bf1f2b (diff) |
textDocument/publishDiagnostics parsing
Diffstat (limited to 'lsp-write.c')
-rw-r--r-- | lsp-write.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lsp-write.c b/lsp-write.c index 99a4e82..fd80799 100644 --- a/lsp-write.c +++ b/lsp-write.c @@ -274,6 +274,8 @@ static const char *lsp_request_method(LSPRequest *request) { return "textDocument/completion"; case LSP_REQUEST_SIGNATURE_HELP: return "textDocument/signatureHelp"; + case LSP_REQUEST_PUBLISH_DIAGNOSTICS: + return "textDocument/publishDiagnostics"; case LSP_REQUEST_HOVER: return "textDocument/hover"; case LSP_REQUEST_REFERENCES: @@ -392,6 +394,7 @@ void write_request(LSP *lsp, LSPRequest *request) { case LSP_REQUEST_SHOW_MESSAGE: case LSP_REQUEST_LOG_MESSAGE: case LSP_REQUEST_WORKSPACE_FOLDERS: + case LSP_REQUEST_PUBLISH_DIAGNOSTICS: assert(0); break; case LSP_REQUEST_SHUTDOWN: @@ -454,6 +457,11 @@ void write_request(LSP *lsp, LSPRequest *request) { write_key_obj_start(o, "documentLink"); write_key_bool(o, "tooltipSupport", true); write_obj_end(o); + + // publish diagnostics capabilities + write_key_obj_start(o, "publishDiagnostics"); + write_key_bool(o, "codeDescriptionSupport", true); + write_obj_end(o); write_obj_end(o); write_key_obj_start(o, "workspace"); write_key_bool(o, "workspaceFolders", true); |