FormatX is your all-in-one code formatter that supports multiple programming languages out of the box!
No more juggling multiple extensions — just one command, one shortcut, one tool. 🎯

🚀 Features
- 🧠 Supports popular languages:
- Python (
black
)
- JavaScript, TypeScript, HTML, CSS, JSON (
prettier
)
- C, C++, Java (
clang-format
)
- Rust (
rustfmt
)
- ⚡ Fast, simple, and efficient
- 💾 Automatically saves after formatting
- 🔧 Easy to use from command palette or right-click menu
- 🔍 Minimal setup — just install required formatters once
🛠️ Installation
📦 From VS Code Marketplace
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X
)
- Search for FormatX
- Click Install
🔧 From CLI
code --install-extension AhumMaitra.formatx
'''
## 📂 How to Use
### ✅ Format your code
- Open a supported file (`.py`, `.js`, `.cpp`, etc.)
- Run the FormatX command:
- Press `Ctrl+Shift+P`
- Select `FormatX: Format Code`
- Or right-click → `FormatX: Format Code`
Your file will be **formatted and auto-saved**! 💾
---
## ⚙️ Requirements
FormatX uses popular formatters. Please install them globally:
| Language | Formatter | Install Command |
|----------------|----------------|------------------------------------------------------|
| Python | `black` | `pip install black` |
| JS / TS / HTML | `prettier` | `npm install -g prettier` |
| C / C++ / Java | `clang-format` | `sudo apt install clang-format` / via LLVM installer |
| Rust | `rustfmt` | `rustup component add rustfmt` |
Ensure these formatters are available in your system `PATH`.
---
## 🧪 Example
### Python
```python
print( "Hello, World!" )
→ Run FormatX → ✅ Formatted to:
print("Hello, World!")
❓ Troubleshooting
Formatter not recognized?
➜ Make sure it's installed and available globally in your terminal (black
, prettier
, etc.)
"Unexpected indent" or parser error?
➜ Check Python version. Some syntax requires Python 3.10+.
"Cannot use --safe" error?
➜ Remove --safe
option if file is new or syntax is broken.
🔗 Repository
🛠 GitHub: https://github.com/TheAhumMaitra/FormatX
📂 Clone the project:
git clone https://github.com/TheAhumMaitra/FormatX
cd FormatX
npm install
npm run compile
code .
Then hit F5
to launch your extension in a new VS Code window.
🌍 Supported Languages
Language |
Extension |
Formatter |
Python |
.py |
black |
JavaScript |
.js |
prettier |
TypeScript |
.ts |
prettier |
HTML / CSS |
.html/.css |
prettier |
JSON |
.json |
prettier |
C / C++ |
.c/.cpp |
clang-format |
Java |
.java |
clang-format |
Rust |
.rs |
rustfmt |
🤝 Contributing
We welcome contributions! To get started:
- Fork the repo
- Create a new branch:
git checkout -b feat/your-feature
- Commit changes:
git commit -m "Add awesome feature"
- Push and create a PR
💬 Found a bug or want a feature? Open an issue
📜 License
This project is licensed under the MIT License.
🙌 Credits
Created with ❤️ by Ahum Maitra
🚀 YouTube: Programming with Ahum
🐙 GitHub: TheAhumMaitra
Special thanks to:
- VS Code API
- Community-supported formatters like Black, Prettier, ClangFormat, and RustFmt
Stay magical, stay formatted! 🧙♂️✨
---#� �F�o�r�m�a�t�X�
�
�