summaryrefslogtreecommitdiff
path: root/lsp-write.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-09-10 13:40:05 -0400
committerpommicket <pommicket@gmail.com>2023-09-10 13:40:05 -0400
commit6586f9e66d87017984f57b3b4579c78897ba66f2 (patch)
treef84ab9a9b4a6449e123cfed0a3e9245750a19fd6 /lsp-write.c
parent5e22cc67e92a87a0448dea70c89a4472b961fa14 (diff)
LSP over TCP on windows
Diffstat (limited to 'lsp-write.c')
-rw-r--r--lsp-write.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lsp-write.c b/lsp-write.c
index 0eed987..974a845 100644
--- a/lsp-write.c
+++ b/lsp-write.c
@@ -332,8 +332,12 @@ static void message_writer_write_and_free(LSP *lsp, JSONWriter *o) {
memcpy(content, header_str, header_size);
#if LSP_SHOW_C2S
- printf("%s%s%s\n",term_bold(stdout),content,term_clear(stdout));
+ const int limit = 1000;
+ debug_println("%s%.*s%s%s",term_italics(stdout),limit,content,
+ strlen(content) > (size_t)limit ? "..." : "",
+ term_clear(stdout));
#endif
+
if (lsp->log) {
fprintf(lsp->log, "LSP MESSAGE FROM CLIENT TO SERVER\n%s\n\n", content + header_size);
}