diff options
author | pommicket <pommicket@gmail.com> | 2022-12-27 00:34:38 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-12-27 00:34:38 -0500 |
commit | 53451f331667180e4b30c1ac0bf33bb48beb37f0 (patch) | |
tree | 4bb3c933441ecde2e899f4486b7f32d84f5cbb22 /ted.c | |
parent | 85ee81b8ae972d17f0e3dc78657077924c047ada (diff) |
better workspaceFolders idea ("withhold judgement")
Diffstat (limited to 'ted.c')
-rw-r--r-- | ted.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -114,6 +114,13 @@ LSP *ted_get_lsp(Ted *ted, const char *path, Language language) { if (!lsp) break; if (lsp->language != language) continue; + if (!lsp->initialized) { + // withhold judgement until this server initializes. + // we shouldn't call lsp_try_add_root_dir yet because it doesn't know + // if the server supports workspaceFolders. + return NULL; + } + // check if root matches up or if we can add a workspace folder char *root = ted_get_root_dir_of(ted, path); bool success = lsp_try_add_root_dir(lsp, root); |