summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-09 23:38:41 -0500
committerpommicket <pommicket@gmail.com>2022-12-09 23:38:41 -0500
commita604ad77ff7ef6a75cccdeb86d1a5608caf7c2a6 (patch)
tree1f70aad0df10dea59548edbf305f195e1dac8112 /main.c
parent4c5be13a9bcd298f01252f71579cd86c7e487966 (diff)
real completion parsing!!
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/main.c b/main.c
index 385e73e..567ac7a 100644
--- a/main.c
+++ b/main.c
@@ -2,7 +2,7 @@
FUTURE FEATURES:
- configurable max buffer size
- better undo chaining (dechain on backspace?)
-- regenerate tags for completion too if there are no results
+- option to regenerate tags for completion too if there are no results
- config variables
- bind key to multiple commands
- plugins?
@@ -315,9 +315,11 @@ int main(int argc, char **argv) {
case LSP_COMPLETION: {
const LSPResponseCompletion *completion = &response->data.completion;
arr_foreach_ptr(completion->items, LSPCompletionItem, item) {
- printf("%s:%s\n",
- lsp_response_string(response, item->sort_text),
+ printf("(%d)%s => ",
+ item->text_edit.type,
lsp_response_string(response, item->label));
+ printf("%s\n",
+ lsp_response_string(response, item->text_edit.new_text));
}
} break;
default: