Fix 'WorkspaceConfiguration' request with empty configuration section strings

pull/2507/head
Philipp Mildenberger 1 year ago
parent 71551d395b
commit 7d4f7eb4bd

@ -1058,10 +1058,13 @@ impl Application {
.filter_map(|item| { .filter_map(|item| {
let mut config = language_server.config()?; let mut config = language_server.config()?;
if let Some(section) = item.section.as_ref() { if let Some(section) = item.section.as_ref() {
// for some reason some lsps send an empty string (observed in 'vscode-eslint-language-server')
if !section.is_empty() {
for part in section.split('.') { for part in section.split('.') {
config = config.get(part)?; config = config.get(part)?;
} }
} }
}
Some(config) Some(config)
}) })
.collect(); .collect();

Loading…
Cancel
Save