diff options
author | pommicket <pommicket@gmail.com> | 2023-01-03 18:36:05 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-01-03 18:36:05 -0500 |
commit | 874d7d0c6555642b06c6d2c3e75c6eddf1c94bd0 (patch) | |
tree | 3760b3aa26466c1a6e3355a18f11e456a6f84d4a /ted.c | |
parent | a648291509aa3b0f91a4b3032b780f1f688379d2 (diff) |
don't start up multiple LSP servers with the same command
Diffstat (limited to 'ted.c')
-rw-r--r-- | ted.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -170,7 +170,7 @@ LSP *ted_get_lsp(Ted *ted, const char *path, Language language) { for (i = 0; i < TED_LSP_MAX; ++i) { LSP *lsp = ted->lsps[i]; if (!lsp) break; - if (lsp->language != language) continue; + if (!streq(lsp->command, settings->lsp)) continue; if (!lsp->initialized) { // withhold judgement until this server initializes. @@ -190,7 +190,7 @@ LSP *ted_get_lsp(Ted *ted, const char *path, Language language) { if (*settings->lsp) { // start up this LSP char *root_dir = settings_get_root_dir(settings, path); - ted->lsps[i] = lsp_create(root_dir, language, settings->lsp); + ted->lsps[i] = lsp_create(root_dir, settings->lsp); free(root_dir); // don't actually return it yet, since it's still initializing (see above) } |