diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -105,6 +105,8 @@ bool tag_goto(Ted *ted, char const *tag); #include "command.c" #include "config.c" #include "session.c" +#include "json.c" +#include "lsp.c" #if PROFILE #define PROFILE_TIME(var) double var = time_get_seconds(); @@ -283,6 +285,27 @@ int main(int argc, char **argv) { PROFILE_TIME(init_start) PROFILE_TIME(basic_init_start) + // @TODO TEMPORARY + { + LSP lsp={0}; + if (!lsp_create(&lsp, "rust-analyzer")) { + printf("lsp_create: %s\n",lsp.error); + exit(1); + } +// LSPRequest test_req = {LSP_COMPLETION}; +// lsp_send_request(&lsp, &test_req); + while (1) { + JSON response = {0}; + if (lsp_next_response(&lsp, &response)) { + json_debug_print(&response); + printf("\n"); + } + usleep(10000); + } + lsp_free(&lsp); + exit(0); + } + #if __unix__ { struct sigaction act = {0}; |