diff options
author | pommicket <pommicket@gmail.com> | 2022-12-20 15:43:24 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-12-20 15:43:24 -0500 |
commit | d3375f02cfed99ed40c28631e62654af23817729 (patch) | |
tree | 575072b13497c3e2f6ba73f3d9feb90214ad6c70 /ted.h | |
parent | 9dc4d70511862004661cd5b0c02adc500c35f42e (diff) |
start completion requests
Diffstat (limited to 'ted.h')
-rw-r--r-- | ted.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 |