mirror of https://github.com/helix-editor/helix
LSP: Fix `Client::supports_feature` check for 'colorProvider'
The old check would allow sending textDocument/documentColor requests when the server declared `{"colorProvider": false}` in its capabilities as this was `Some`: Some(ColorProviderCapability::Simple(false)) The Julia language server sets this explicitly to `false` in the wild.pull/12085/head
parent
9f3b193743
commit
47cdd23e50
|
@ -356,7 +356,14 @@ impl Client {
|
||||||
capabilities.inlay_hint_provider,
|
capabilities.inlay_hint_provider,
|
||||||
Some(OneOf::Left(true) | OneOf::Right(InlayHintServerCapabilities::Options(_)))
|
Some(OneOf::Left(true) | OneOf::Right(InlayHintServerCapabilities::Options(_)))
|
||||||
),
|
),
|
||||||
LanguageServerFeature::DocumentColors => capabilities.color_provider.is_some(),
|
LanguageServerFeature::DocumentColors => matches!(
|
||||||
|
capabilities.color_provider,
|
||||||
|
Some(
|
||||||
|
ColorProviderCapability::Simple(true)
|
||||||
|
| ColorProviderCapability::ColorProvider(_)
|
||||||
|
| ColorProviderCapability::Options(_)
|
||||||
|
)
|
||||||
|
),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue