From 3a1af93e9c0f983da64070d3774596844c2a26e1 Mon Sep 17 00:00:00 2001 From: pommicket Date: Tue, 30 Sep 2025 10:42:13 -0400 Subject: Initial implementation of code actions --- ted-internal.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'ted-internal.h') diff --git a/ted-internal.h b/ted-internal.h index a4b5574..bf05f91 100644 --- a/ted-internal.h +++ b/ted-internal.h @@ -260,6 +260,9 @@ typedef struct Definitions Definitions; /// "highlight" information from LSP server typedef struct Highlights Highlights; +/// "code action" information from LSP server +typedef struct CodeAction CodeAction; + typedef struct Macro Macro; typedef struct LoadedFont LoadedFont; @@ -364,6 +367,7 @@ struct Ted { Usages *usages; RenameSymbol *rename_symbol; Formatting *formatting; + CodeAction *code_action; /// process ID int pid; @@ -649,7 +653,10 @@ void autocomplete_frame(Ted *ted); void autocomplete_process_lsp_response(Ted *ted, const LSPResponse *response); // === ide-code-action.c === -void code_action_start(Ted *ted); +void code_action_init(Ted *ted); +void code_action_quit(Ted *ted); +void code_action_frame(Ted *ted); +bool code_action_process_lsp_response(Ted *ted, const LSPResponse *response); // === ide-definitions.c === void definitions_init(Ted *ted); @@ -788,5 +795,7 @@ void ted_free_fonts(Ted *ted); void ted_process_publish_diagnostics(Ted *ted, LSP *lsp, LSPRequest *request); /// check inotify fd for events void ted_check_inotify(Ted *ted); +/// perform LSP WorkspaceEdit +void ted_perform_workspace_edit(Ted *ted, LSP *lsp, const LSPResponse *response, const LSPWorkspaceEdit *edit); #endif // TED_INTERNAL_H_ -- cgit v1.2.3