Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/recognize-format-capabilities.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@biomejs/biome": patch
---

Fixed #8209: Recognized formatting capability when either range or on-type formatting is supported, not only full-file formatting. This ensures editors and the language server correctly detect formatting support in files like JSONC.
5 changes: 4 additions & 1 deletion crates/biome_service/src/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ impl FeaturesSupported {
/// Adds the features that are enabled in `capabilities` to this result.
#[inline]
pub fn with_capabilities(mut self, capabilities: &Capabilities) -> Self {
if capabilities.formatter.format.is_some() {
if capabilities.formatter.format.is_some()
|| capabilities.formatter.format_range.is_some()
|| capabilities.formatter.format_on_type.is_some()
{
self.insert(FeatureKind::Format, SupportKind::Supported);
}
if capabilities.analyzer.lint.is_some() {
Expand Down