🔧 Format all your files in a workspace with one click. 🔧
You can define include and exclude patterns to manage which files and directories should be formatted.
Besides that, you can also select only certain directories to format with the context menu.
- Open the command palette (F1)
- Run the command: Workspace Formatter: Run
- All files will be formatted w.r.t the include/exclude patterns
- Select any folder in the context menu, by right-clicking
- Run the context-menu command: Format Directory
- All files will be formatted w.r.t the include/exclude patterns
For including/excluding glob patterns are used.
For more information about glob patterns see here.
You can add glob patterns to include folder and file names.
Per default, there is no include filter.
For example, if you only want to format typescript files in your workspace, you could add the following glob pattern:
"Workspace_Formatter.includePattern": ["*.ts"]
You can add glob patterns to exclude folder and file names.
Per default, all folders and files starting with a "." are excluded, also all directories that are called build.
For example, if you want to skip formatting for javascript files in your workspace, you could add the following glob pattern:
"Workspace_Formatter.excludePattern": ["*.js"]
- ⚙️ Glob pattern to include from the folder selection (defaults to ["*"])
- ⚙️ Glob pattern to exclude from the folder selection (defaults to ["**/build", "**/.*", "**/.vscode"])
- ⚙️ Whether to save the currently formatted file (defaults to true)
- ⚙️ Whether to close the currently formatted file. Only used (defaults to true)
Refer to the CHANGELOG.
Copyright (C) 2021 Jan Schaffranek.
Licensed under the MIT License.
Feel free to make a donation, such that i have more time to work on my VSCode extensions.
Or use the Link: https://www.paypal.com/donate/?hosted_button_id=3WDK6ET99ZQCU