From 2d10a429ebf7abe5af184b6227346377dc0523e8 Mon Sep 17 00:00:00 2001
From: Pascal Kuthe
Date: Tue, 31 Jan 2023 00:31:21 +0100
Subject: add workspace config and manual LSP root management
fixup documentation
Co-authored-by: LeoniePhiline <22329650+LeoniePhiline@users.noreply.github.com>
fixup typo
Co-authored-by: LeoniePhiline <22329650+LeoniePhiline@users.noreply.github.com>
---
helix-lsp/src/lib.rs | 56 +++++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 53 insertions(+), 3 deletions(-)
(limited to 'helix-lsp/src/lib.rs')
diff --git a/helix-lsp/src/lib.rs b/helix-lsp/src/lib.rs
index 5609a624..e4b00946 100644
--- a/helix-lsp/src/lib.rs
+++ b/helix-lsp/src/lib.rs
@@ -10,11 +10,15 @@ pub use lsp::{Position, Url};
pub use lsp_types as lsp;
use futures_util::stream::select_all::SelectAll;
-use helix_core::syntax::{LanguageConfiguration, LanguageServerConfiguration};
+use helix_core::{
+ find_workspace,
+ syntax::{LanguageConfiguration, LanguageServerConfiguration},
+};
use tokio::sync::mpsc::UnboundedReceiver;
use std::{
collections::{hash_map::Entry, HashMap},
+ path::PathBuf,
sync::{
atomic::{AtomicUsize, Ordering},
Arc,
@@ -641,6 +645,7 @@ impl Registry {
&mut self,
language_config: &LanguageConfiguration,
doc_path: Option<&std::path::PathBuf>,
+ root_dirs: &[PathBuf],
) -> Result