Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions helix-lsp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -897,10 +897,9 @@ fn start_client(
workspace_is_cwd,
);

// `root_uri` and `workspace_folder` can be empty in case there is no workspace
// `root_url` can not, use `workspace` as a fallback
// in case there is no root use `workspace` as a fallback
let root_path = root.clone().unwrap_or_else(|| workspace.clone());
let root_uri = root.and_then(|root| lsp::Url::from_file_path(root).ok());
let root_uri = lsp::Url::from_file_path(&root_path).ok();

if let Some(globset) = &ls_config.required_root_patterns {
if !root_path
Expand Down