Add configuration option to choose reformatter
See original GitHub issueBackground
Since upgrading to the latest Beta, I’ve noticed how radically different (and unconfigurable) Ormolu’s output is to hindent + stylish-haskell. However, there’s no easy way to apply one formatter (other than the new shortcut, which only sometimes works for me)
Feature Request
It would be great for users to be able to choose which formatter to use (by default?), e.g. via a dropdown in the settings menu, e.g. (excuse the ASCII art here)
Formatter: | stylish-haskell v|
|......................|
| ormolu |
| hindent |
| brittany |
\----------------------/
Alternatively / additionally this could be configured in the extended code reformat menu maybe?
Notes
The normal shortcut keys could apply all the time, and it would remain easy to add formatters (e.g. see #319)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:7 (7 by maintainers)
Top Results From Across the Web
How To Format Code with Prettier in Visual Studio Code
To do so, click the Configure button: Prompt for selecting a default formatter. Then choose Prettier - Code Formatter. Selecting Prettier.
Read more >VS Code tips — Managing multiple formatters (and selecting a ...
The editor.defaultFormatter setting in VS Code lets you configure which of your installed formatters is run for a given language.
Read more >How do you change the formatting options in Visual Studio ...
go to file -> preferences -> settings search for format , on the left side, click on Text Editor , the very first...
Read more >How to configure Prettier and VSCode - Gleb Bahmutov
js gets formatted by Prettier using different local settings and ends up looking different. Single quotes, no semi-colons, trailing commas.
Read more >How to set up Prettier and automatic formatting on VS Code
Step 1: Install Prettier ... Click on the configure button. ... After you click on configure, select Prettier as the default formatter.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for reporting!
I will consider it and think about a simple/maintainable solution. Btw, hindent is not maintained anymore AFAIK. Could be that the alternative reformatters have to be build by yourself and be configured in Haskell Settings.
This will still be a great benefit for us. Not everyone like Ormolu, but having the plugin auto-apply formatting is great!
One more to add to the list: https://github.com/parsonsmatt/fourmolu ❤️