diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2023-09-08 00:50:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-08 00:50:34 +0100 |
commit | 4a11603c76b13ecf92ce3141ec317a42ae9f8d1d (patch) | |
tree | 00718c6131da9cd353335731ea78e37ca5ce5e92 /cli/lsp/repl.rs | |
parent | 9d6584c16f8c759f321ab82a3b9d03d0e2e1d363 (diff) |
refactor(lsp): clean up "enablePaths" handling (#20388)
Previously we pre-computed enabled paths into `Config::enabled_paths`,
and had to keep updating it. Now we determine enabled paths directly
from `Config::settings` on demand as a single source of truth.
Removes `Config::root_uri`. If `InitializeParams::rootUri` is given, and
it doesn't correspond to a folder in
`InitializeParams::workspaceFolders`, prepend it to
`Config::workspace_folders` as a mocked folder.
Includes groundwork for
https://github.com/denoland/vscode_deno/issues/908. In a minor version
cycle or two we can fix that in vscode_deno, and it won't break for Deno
versions post this patch due to the corrected deserialization logic for
`enablePaths`.
Diffstat (limited to 'cli/lsp/repl.rs')
-rw-r--r-- | cli/lsp/repl.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/lsp/repl.rs b/cli/lsp/repl.rs index 598674fdc..6c820701c 100644 --- a/cli/lsp/repl.rs +++ b/cli/lsp/repl.rs @@ -285,7 +285,7 @@ fn get_cwd_uri() -> Result<ModuleSpecifier, AnyError> { pub fn get_repl_workspace_settings() -> WorkspaceSettings { WorkspaceSettings { enable: Some(true), - enable_paths: Vec::new(), + enable_paths: None, config: None, certificate_stores: None, cache: None, |