File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -12062,16 +12062,15 @@ impl LspStore {
12062
12062
}
12063
12063
}
12064
12064
12065
- // Registration with empty capabilities should be ignored .
12066
- // https://github.com/microsoft/vscode-languageserver-node/blob/d90a87f9557a0df9142cfb33e251cfa6fe27d970/client/src/common/formatting .ts#L67-L70
12065
+ // Registration with registerOptions as null, should fallback to true .
12066
+ // https://github.com/microsoft/vscode-languageserver-node/blob/d90a87f9557a0df9142cfb33e251cfa6fe27d970/client/src/common/client .ts#L2133
12067
12067
fn parse_register_capabilities<T: serde::de::DeserializeOwned>(
12068
12068
reg: lsp::Registration,
12069
12069
) -> anyhow::Result<Option<OneOf<bool, T>>> {
12070
- Ok(reg
12071
- .register_options
12072
- .map(|options| serde_json::from_value::<T>(options))
12073
- .transpose()?
12074
- .map(OneOf::Right))
12070
+ Ok(match reg.register_options {
12071
+ Some(options) => Some(OneOf::Right(serde_json::from_value::<T>(options)?)),
12072
+ None => Some(OneOf::Left(true)),
12073
+ })
12075
12074
}
12076
12075
12077
12076
fn subscribe_to_binary_statuses(
You can’t perform that action at this time.
0 commit comments