This VS Code extension provides integration with treefmt, a multi-language code formatter. It allows you to format your code based on the configuration defined in your treefmt.toml file.
- Automatically formats your code based on
treefmt.tomlconfiguration. - Supports a wide range of languages through various formatters.
- No additional configuration needed within the extension.
- Can be set as the default formatter in VS Code.
You can install it directly from the Visual Studio Marketplace.
Alternatively, open the Extensions view (Ctrl+Shift+X), search for treefmt, and click Install.
Or, you can install it from the command line:
code --install-extension ibecker.treefmt-vscodeThe extension uses the treefmt.toml file located in the root of your project directory.
You can create this file manually or use the treefmt --init command to generate a template.
If you try to format a file without a treefmt.toml file, the extension will display an message and offer
to run treefmt --init on your behalf.
To set this extension as the default formatter for your workspace:
- Open VS Code settings (
Ctrl+,). - Search for
default formatter. - Set the default formatter to
Treefmt.
Now, every time you format a file, treefmt will be used according to your treefmt.toml configuration.
Contributions are welcome! Feel free to open issues or submit pull requests to improve the extension.
This project is licensed under the GPLv3 License.