diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-03-30 10:43:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-30 10:43:16 -0400 |
commit | e0429e2ad641e9207e00838de209ce33b3562f70 (patch) | |
tree | 496c38dadb79c4dc9ae4eea755e2ac6a65440ad4 /cli/lsp/repl.rs | |
parent | 3deade4b14de809f67ed0471f8e91c91b25fedcc (diff) |
fix(repl): improve package.json support (#18497)
1. Fixes a cosmetic issue in the repl where it would display lsp warning
messages.
2. Lazily loads dependencies from the package.json on use.
3. Supports using bare specifiers from package.json in the REPL.
Closes #17929
Closes #18494
Diffstat (limited to 'cli/lsp/repl.rs')
-rw-r--r-- | cli/lsp/repl.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cli/lsp/repl.rs b/cli/lsp/repl.rs index 41a3f993a..ada8b9404 100644 --- a/cli/lsp/repl.rs +++ b/cli/lsp/repl.rs @@ -53,7 +53,10 @@ pub struct ReplLanguageServer { impl ReplLanguageServer { pub async fn new_initialized() -> Result<ReplLanguageServer, AnyError> { + // downgrade info and warn lsp logging to debug super::logging::set_lsp_log_level(log::Level::Debug); + super::logging::set_lsp_warn_level(log::Level::Debug); + let language_server = super::language_server::LanguageServer::new(Client::new_for_repl()); |