diff options
author | PiergiorgioZagaria | 2022-08-04 04:01:48 +0000 |
---|---|---|
committer | GitHub | 2022-08-04 04:01:48 +0000 |
commit | 219d2c25156a496ed2923d4cef256352bb1302e5 (patch) | |
tree | 54591f266245136d22a7895a8459814e41ecac26 /helix-view/src/editor.rs | |
parent | c5f8a835f54b27c9f1c22c8321378a309d371309 (diff) |
Change default formatter for any language (#2942)
* Change default formatter for any language
* Fix clippy error
* Close stdin for Stdio formatters
* Better indentation and pattern matching
* Return Result<Option<...>> for fn format instead of Option
* Remove unwrap for stdin
* Handle FormatterErrors instead of Result<Option<...>>
* Use Transaction instead of LspFormatting
* Use Transaction directly in Document::format
* Perform stdin type formatting asynchronously
* Rename formatter.type values to kebab-case
* Debug format for displaying io::ErrorKind (msrv fix)
* Solve conflict?
* Use only stdio type formatters
* Remove FormatterType enum
* Remove old comment
* Check if the formatter exited correctly
* Add formatter configuration to the book
* Avoid allocations when writing to stdin and formatting errors
* Remove unused import
Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
Diffstat (limited to 'helix-view/src/editor.rs')
-rw-r--r-- | helix-view/src/editor.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index 501c3069..1e7f508c 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -613,7 +613,6 @@ impl Editor { syn_loader: Arc<syntax::Loader>, config: Box<dyn DynAccess<Config>>, ) -> Self { - let language_servers = helix_lsp::Registry::new(); let conf = config.load(); let auto_pairs = (&conf.auto_pairs).into(); @@ -629,7 +628,7 @@ impl Editor { macro_recording: None, macro_replaying: Vec::new(), theme: theme_loader.default(), - language_servers, + language_servers: helix_lsp::Registry::new(), diagnostics: BTreeMap::new(), debugger: None, debugger_events: SelectAll::new(), |