summaryrefslogtreecommitdiff
path: root/lsp.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-01-06 18:00:14 -0500
committerpommicket <pommicket@gmail.com>2023-01-06 18:00:45 -0500
commit082daa54c41c44ad1e878485237faea8f9a60678 (patch)
tree5ffdeb9245c7210fd8a2e35357e9b548f32f7c06 /lsp.c
parent2d32df18e83b059834ae65904e6439c72372454b (diff)
finished lsp-log
Diffstat (limited to 'lsp.c')
-rw-r--r--lsp.c5
1 files changed, 4 insertions, 1 deletions
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)) {