Code Beautifier is a VS Code extension that helps you format your code with a single click or keyboard shortcut. It supports multiple languages including JavaScript, TypeScript, HTML, CSS, SCSS, JSON, and Python.
Features
Format code with a single command (Cmd+Alt+F on Mac, Ctrl+Alt+F on Windows/Linux)
Support for multiple languages:
JavaScript/TypeScript
HTML
CSS/SCSS
JSON
Python
Customizable indentation settings
Format on save (optional)
Context menu integration
Usage
Open a file you want to format
Use the keyboard shortcut Cmd+Alt+F (Mac) or Ctrl+Alt+F (Windows/Linux)
Alternatively, right-click and select "Format Code" from the context menu
You can also run the command from the Command Palette (Cmd+Shift+P or Ctrl+Shift+P) by typing "Format Code"
Extension Settings
This extension contributes the following settings:
codeBeautifier.enableAutoFormat: Enable/disable auto-formatting on save
codeBeautifier.supportedLanguages: Languages supported by the formatter
codeBeautifier.indentSize: Number of spaces for indentation (default: 2)
codeBeautifier.useTabs: Use tabs instead of spaces for indentation (default: false)
Requirements
No additional requirements or dependencies needed.
Known Issues
Some complex formatting options might not be available compared to language-specific formatters
Release Notes
0.0.1
Initial release
Support for JavaScript, TypeScript, HTML, CSS, SCSS, JSON, and Python formatting
Development
Building the Extension
Clone the repository
Run npm install to install dependencies
Run npm run compile to compile the TypeScript code