diff options
author | pommicket <pommicket@gmail.com> | 2025-09-29 13:29:56 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2025-09-29 15:29:51 -0400 |
commit | 6c4baeebd88352399059a8df8d38ebe3511588ea (patch) | |
tree | 98db7bb4f36a47f8f9ac5a53dcb06e8cd19cf762 /lsp.h | |
parent | ec03a105ce7a6e396cfd287cbfe902d65bac1474 (diff) |
Start code actions
Diffstat (limited to 'lsp.h')
-rw-r--r-- | lsp.h | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -97,6 +97,7 @@ typedef enum { LSP_REQUEST_LOG_MESSAGE, //< window/logMessage LSP_REQUEST_WORKSPACE_FOLDERS, //< workspace/workspaceFolders - NOTE: this is handled directly in lsp-parse.c (because it only needs information from the LSP struct) LSP_REQUEST_PUBLISH_DIAGNOSTICS, //< textDocument/publishDiagnostics + LSP_REQUEST_CODE_ACTION, //< textDocument/codeAction } LSPRequestType; typedef enum { @@ -259,6 +260,11 @@ typedef struct { } LSPRequestFormatting; typedef struct { + LSPDocumentID document; + LSPRange range; +} LSPRequestCodeAction; + +typedef struct { LSPMessageType type; /// LSP requests/responses tend to have a lot of strings. /// to avoid doing a ton of allocations+frees, @@ -296,6 +302,7 @@ typedef struct { LSPRequestPublishDiagnostics publish_diagnostics; // LSP_REQUEST_FORMATTING and LSP_REQUEST_RANGE_FORMATTING LSPRequestFormatting formatting; + LSPRequestCodeAction code_action; } data; } LSPRequest; @@ -629,6 +636,7 @@ typedef struct { bool document_link_support; bool formatting_support; bool range_formatting_support; + bool code_action_support; } LSPCapabilities; typedef struct LSP LSP; @@ -939,8 +947,8 @@ LSPString lsp_request_add_json_string(LSPRequest *request, const JSON *json, JSO void lsp_write_quit(void); /// print server-to-client communication -#define LSP_SHOW_S2C 0 +#define LSP_SHOW_S2C 1 /// print client-to-server communication -#define LSP_SHOW_C2S 0 +#define LSP_SHOW_C2S 1 #endif // LSP_INTERNAL |