Skip to content

Commit 2126748

Browse files
committed
fix: do not skip local config file
1 parent 6ce8d76 commit 2126748

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ impl LanguageServer for Backend {
114114
match params.initialization_options.map(serde_json::from_value::<Config>) {
115115
Some(Ok(config)) => {
116116
self.on_change_config(config).await;
117-
break 'root;
118117
}
119118
Some(Err(err)) => {
120119
error!("could not parse provided config:\n{err}");
@@ -125,8 +124,9 @@ impl LanguageServer for Backend {
125124
let config_file = 'find_root: {
126125
for choice in [".odoo_lsp", ".odoo_lsp.json"] {
127126
let path = root.join(choice);
128-
if let Ok(file) = tokio::fs::read(&path).await {
129-
break 'find_root Some((path, file));
127+
match tokio::fs::read(&path).await {
128+
Ok(file) => break 'find_root Some((path, file)),
129+
Err(err) => error!("(initialize) could not read {path:?}: {err}"),
130130
}
131131
}
132132
None

0 commit comments

Comments
 (0)