mirror of
https://github.com/Automattic/harper.git
synced 2025-12-23 08:48:15 +00:00
fix(ls): prevent panic when workspace/configuration is unsupported (#2309)
This commit is contained in:
parent
782ab95200
commit
4b8c619bb7
1 changed files with 2 additions and 2 deletions
|
|
@ -26,7 +26,7 @@ use harper_literate_haskell::LiterateHaskellParser;
|
|||
use harper_python::PythonParser;
|
||||
use harper_stats::{Record, Stats};
|
||||
use harper_typst::Typst;
|
||||
use serde_json::Value;
|
||||
use serde_json::{Value, json};
|
||||
use tokio::sync::{Mutex, RwLock};
|
||||
use tower_lsp_server::jsonrpc::Result as JsonResult;
|
||||
use tower_lsp_server::lsp_types::notification::PublishDiagnostics;
|
||||
|
|
@ -483,7 +483,7 @@ impl Backend {
|
|||
section: None,
|
||||
}])
|
||||
.await
|
||||
.unwrap();
|
||||
.unwrap_or(vec![json!({ "harper-ls": {} })]);
|
||||
|
||||
if let Some(first) = new_config.pop() {
|
||||
self.update_config_from_obj(first).await;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue