summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lsp-write.c2
-rw-r--r--lsp.c5
-rw-r--r--main.c4
-rw-r--r--ted.cfg2
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));
diff --git a/lsp.c b/lsp.c
index 2c9b680..6fb1d15 100644
--- a/lsp.c
+++ b/lsp.c
@@ -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)) {
diff --git a/main.c b/main.c
index a0bc3b6..85d1a6f 100644
--- a/main.c
+++ b/main.c
@@ -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
diff --git a/ted.cfg b/ted.cfg
index 94e528d..8d571c1 100644
--- a/ted.cfg
+++ b/ted.cfg
@@ -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