mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Add support for formatting entire document with rustfmt
Attempting to format a document when rustfmt isn't installed will result in an error being returned to the frontend. An alternative implementation would be returning zero replacements.
This commit is contained in:
parent
2aac6b0e34
commit
8b24f158f7
6 changed files with 95 additions and 3 deletions
|
@ -33,7 +33,7 @@ pub fn server_capabilities() -> ServerCapabilities {
|
|||
workspace_symbol_provider: Some(true),
|
||||
code_action_provider: Some(CodeActionProviderCapability::Simple(true)),
|
||||
code_lens_provider: None,
|
||||
document_formatting_provider: None,
|
||||
document_formatting_provider: Some(true),
|
||||
document_range_formatting_provider: None,
|
||||
document_on_type_formatting_provider: Some(DocumentOnTypeFormattingOptions {
|
||||
first_trigger_character: "=".to_string(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue