From d3375f02cfed99ed40c28631e62654af23817729 Mon Sep 17 00:00:00 2001 From: pommicket Date: Tue, 20 Dec 2022 15:43:24 -0500 Subject: start completion requests --- ted.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ted.h') diff --git a/ted.h b/ted.h index 3d2bbc6..df50f8b 100644 --- a/ted.h +++ b/ted.h @@ -352,6 +352,11 @@ typedef struct { u32 build_output_line; // which line in the build output corresponds to this error } BuildError; +typedef struct { + char *label; + char *text; +} Autocompletion; + typedef struct Ted { struct LSP *test_lsp; // @TODO: something better @@ -405,6 +410,8 @@ typedef struct Ted { bool building; // is the build process running? bool autocomplete; // is the autocomplete window open? + Autocompletion *autocompletions; // dynamic array of suggestions + BufferPos autocomplete_pos; // position of cursor last time completions were generated. if this changes, we need to recompute completions. i32 autocomplete_cursor; // which completion is currently selected Rect autocomplete_rect; // rectangle where the autocomplete menu is (needed to avoid interpreting autocomplete clicks as other clicks) @@ -468,6 +475,7 @@ typedef struct Ted { char error_shown[512]; // error display in box on screen } Ted; +void autocomplete_close(Ted *ted); void command_execute(Ted *ted, Command c, i64 argument); void ted_switch_to_buffer(Ted *ted, TextBuffer *buffer); // the settings of the active buffer, or the default settings if there is no active buffer -- cgit v1.2.3