Skip to content

Commit d74f859

Browse files
committed
Add missing range formatting capability
1 parent 5476dec commit d74f859

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/cli/lsp.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ fn handle_request(
174174
fn main_loop(connection: Connection, config_resolver: &mut ConfigResolver) -> anyhow::Result<()> {
175175
let initialize_result = InitializeResult {
176176
capabilities: ServerCapabilities {
177+
document_range_formatting_provider: Some(OneOf::Left(true)),
177178
document_formatting_provider: Some(OneOf::Left(true)),
178179
text_document_sync: Some(TextDocumentSyncCapability::Kind(
179180
TextDocumentSyncKind::INCREMENTAL,
@@ -289,6 +290,7 @@ mod tests {
289290
&& result
290291
== serde_json::json!({
291292
"capabilities": ServerCapabilities {
293+
document_range_formatting_provider: Some(OneOf::Left(true)),
292294
document_formatting_provider: Some(OneOf::Left(true)),
293295
text_document_sync: Some(TextDocumentSyncCapability::Kind(
294296
TextDocumentSyncKind::INCREMENTAL,

0 commit comments

Comments
 (0)