on master help sign in
Fix 'WorkspaceConfiguration' request with empty configuration section strings
commit7d4f7eb4bda6e507e253cb276ccce254fdd51575 authorPhilipp Mildenberger <philipp@mildenberger.me> dateMon 27 Mar 2023, 21:05 (4 years ago) parent71551d3
1 file changed+5−2
helix-term/src/application.rs+5−2
helix-term/src/application.rs+5−2
@@ -1058,8 +1058,11 @@ impl Application {
10581058 .filter_map(|item| {
10591059 let mut config = language_server.config()?;
10601060 if let Some(section) = item.section.as_ref() {
1061− for part in section.split('.') {
1062− config = config.get(part)?;
1061+ // for some reason some lsps send an empty string (observed in 'vscode-eslint-language-server')
1062+ if !section.is_empty() {
1063+ for part in section.split('.') {
1064+ config = config.get(part)?;
1065+ }
10631066 }
10641067 }
10651068 Some(config)