mirror of
https://github.com/realAscot/helix.git
synced 2025-09-14 04:03:03 +02:00
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.
This commit is contained in:
parent
9f3b193743
commit
47cdd23e50
@ -356,7 +356,14 @@ impl Client {
|
||||
capabilities.inlay_hint_provider,
|
||||
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…
x
Reference in New Issue
Block a user