Multi Formatter ExtensionVisualStudio Code Extension About the ExtensionWith this extension you will be able to use more than one formatter for the same language, which make it easier to keep your code as neat as possible when one formatter do different things than others. With this extension you will be able to run, for example, the three: Prettier, Eslint and Visual Studio Code formatters in just one run and in the order you prefer to get the best results. InstallationYou can find the extension in the Visual Studio Code extension store, however, you can build it and install it yourself by running following commands:
Where the ConfigurationWhen the extension is installed for the first time, you will need to configure the order in which the formatters will run, so, for example for JavaScript and PHP you can add the following to your
So, for the example above, Eslint will run first than the TypeScript formatter for Javascript files, and PHP Sniffer will run before Intelephense formatter for PHP files. If you don't provide any formatter, the extension will use the default one. Also, as you can see in the examples, you can also set this extension as the default formatter ( You can get the name of the formatters to use from the available options that appear when editing the ExecutionOnce its configured you have 2 ways to run this formatter: Using it as language formatterThis extension will show up as a formatter for the supported languages (see "Supported languages and frameworks" section below), so you will be able to run it using the VSCode integrated features like the shortcut Running extension defined actionsThis extension comes with 2 actions that you can configure the way you want and add the shortcuts you want, so they can run apart of the formatter itself. Their names are Supported languages and frameworks
It's probably easy to add more of them to the list as this depends on other formatters and it's not a formatter by itself, so feel free to add by yourself any language you want in the LicenseThis code is licensed under GNU GPLv3 |