summaryrefslogtreecommitdiff
path: root/lsp.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-01-09 13:51:46 -0500
committerpommicket <pommicket@gmail.com>2023-01-09 13:51:46 -0500
commit2d9c5407fdc923a2e8c1fe39213b09c769a74e2e (patch)
treef33ea9a53be292f2f4e67994a0a30d2e489bba31 /lsp.c
parenta7d4e507d07919fba43ba14e9eb4fb62de2691f9 (diff)
fix some windows problems
Diffstat (limited to 'lsp.c')
-rw-r--r--lsp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lsp.c b/lsp.c
index af61254..b9b0398 100644
--- a/lsp.c
+++ b/lsp.c
@@ -538,7 +538,13 @@ LSP *lsp_create(const char *root_dir, const char *command, const char *configura
lsp->process = process_run_ex(command, &settings);
const char *error = process_geterr(lsp->process);
if (error) {
- lsp_set_error(lsp, "Couldn't start LSP server: %s", error);
+ // don't show an error box if the server is not installed
+ #if _WIN32
+ if (strstr(error, " 2)")) {
+ if (lsp->log) fprintf(lsp->log, "Couldn't start LSP server %s: file not found.", command);
+ } else
+ #endif
+ lsp_set_error(lsp, "Couldn't start LSP server: %s", error);
lsp->exited = true;
process_kill(&lsp->process);
} else {