diff options
author | pommicket <pommicket@gmail.com> | 2023-01-06 18:00:14 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-01-06 18:00:45 -0500 |
commit | 082daa54c41c44ad1e878485237faea8f9a60678 (patch) | |
tree | 5ffdeb9245c7210fd8a2e35357e9b548f32f7c06 | |
parent | 2d32df18e83b059834ae65904e6439c72372454b (diff) |
finished lsp-log
-rw-r--r-- | lsp-write.c | 2 | ||||
-rw-r--r-- | lsp.c | 5 | ||||
-rw-r--r-- | main.c | 4 | ||||
-rw-r--r-- | ted.cfg | 2 |
4 files changed, 7 insertions, 6 deletions
diff --git a/lsp-write.c b/lsp-write.c index df31d47..0883929 100644 --- a/lsp-write.c +++ b/lsp-write.c @@ -328,7 +328,7 @@ static void message_writer_write_and_free(LSP *lsp, JSONWriter *o) { printf("%s%s%s\n",term_bold(stdout),content,term_clear(stdout)); #endif if (lsp->log) { - fprintf(lsp->log, "MESSAGE FROM CLIENT TO SERVER\n%s\n\n", content + header_size); + fprintf(lsp->log, "LSP MESSAGE FROM CLIENT TO SERVER\n%s\n\n", content + header_size); } process_write(lsp->process, content, strlen(content)); @@ -278,6 +278,9 @@ static void lsp_receive(LSP *lsp, size_t max_size) { if (nstderr > 0) { // uh oh stderr_buf[nstderr] = '\0'; + if (lsp->log) { + fprintf(lsp->log, "LSP SERVER STDERR\n%s\n\n", stderr_buf); + } eprint("%s%s%s%s", term_bold(stderr), term_yellow(stderr), stderr_buf, term_clear(stderr)); } else { break; @@ -309,7 +312,7 @@ static void lsp_receive(LSP *lsp, size_t max_size) { char *copy = strn_dup(lsp->received_data + response_offset, response_size); if (lsp->log) { - + fprintf(lsp->log, "LSP MESSAGE FROM SERVER TO CLIENT\n%s\n\n", copy); } JSON json = {0}; if (json_parse(&json, copy)) { @@ -5,17 +5,15 @@ - check that tags still works - check that phantom completions works with tags - do we need higher than 1-second resolution in time_last_modified on windows? +- when searching files, put exact matches at the top - TESTING: make rust-analyzer-slow (waits 10s before sending response) - TESTING: check all IDE features with different servers - run everything through valgrind ideally with leak checking - grep -i -n TODO *.[ch] -- when searching files, put exact matches at the top -- auto-set build command for cmake (both for windows and unix) - some way of opening + closing all C files in directory for clangd textDocument/references to work? - maybe it can be done with the clangd config instead. - does vscode have the same problem? -- more documentation generally - rust-analyzer bug reports: - bad json can give "Unexpected error: client exited without proper shutdown sequence" - containerName not always given in textDocument/references @@ -40,7 +40,7 @@ phantom-completions = on lsp-enabled = yes # enable this to log all messages between ted and the LSP server # (may require restarting ted to update) -lsp-log = no +lsp-log = yes # display function signature help? (only with LSP running) # this is the thing at the bottom of ted which shows the parameters to the function you're calling signature-help-enabled = yes |