Code Formatter for VSCodeA plugin that allows applying code formatting with minimum configuration. Includes support for running the following formatters:
UsageBy default, files are formatted on save. You can disable this behavior by going to VSCode settings and searching for "Codefmt". There your can disable on save formatting, as well as enabling the debug mode. To format files individually, you can use the Command Pallette and search for "Codefmt". By default, the following formatters will be used:
You can change the default formatters by changing the setting
The following example uses
Attention:: The preferred formatters list order is important: formatters run from top to down. To add new formatters, or change the arguments used by an existing format, use
the The following example replaces the existing
Notice that a formatter command may use any of this placeholders:
For commands that output the formatted file to stdout, you can use
LicenseCopyright (c) 2021 Nando Vieira MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |