summaryrefslogtreecommitdiff
path: root/ted.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-26 01:28:49 -0500
committerpommicket <pommicket@gmail.com>2022-12-26 01:28:49 -0500
commit44d607df5d5a9a1c892fe56c4874fbef7f209464 (patch)
tree988a3a73951300986ea91d23d67bbe37a02d5daf /ted.c
parent9602ae4d8582c3ccdb9e8c1561ad306491713be4 (diff)
start workspace folders stuff
Diffstat (limited to 'ted.c')
-rw-r--r--ted.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ted.c b/ted.c
index 637a592..34d67a2 100644
--- a/ted.c
+++ b/ted.c
@@ -103,9 +103,10 @@ LSP *ted_get_lsp(Ted *ted, const char *path, Language language) {
if (lsp->language != language) continue;
// check if root matches up
- const char *lsp_root = lsp->root_dir;
- if (str_has_path_prefix(path, lsp_root))
- return lsp;
+ arr_foreach_ptr(lsp->workspace_folders, char *, lsp_root) {
+ if (str_has_path_prefix(path, *lsp_root))
+ return lsp;
+ }
}
if (i == TED_LSP_MAX)
return NULL; // why are there so many LSP open???