https://github.com/a11ce/micro-autofmt
Multi-language autoformatter for Micro
https://github.com/a11ce/micro-autofmt
micro-editor
Last synced: 11 months ago
JSON representation
Multi-language autoformatter for Micro
- Host: GitHub
- URL: https://github.com/a11ce/micro-autofmt
- Owner: a11ce
- License: gpl-3.0
- Created: 2020-12-09T10:10:56.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-07-10T03:30:57.000Z (11 months ago)
- Last Synced: 2025-07-10T11:57:05.412Z (11 months ago)
- Topics: micro-editor
- Language: Lua
- Homepage:
- Size: 26.4 KB
- Stars: 20
- Watchers: 1
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# micro-autofmt
> Multi-language formatting plugin for the [Micro editor](https://github.com/zyedidia/micro)
## Setup
- `git clone` and `make`
- Install whichever formatters you want to use
## Usage
- Run `fmt` to format the current file.
- Files will be formatted on save, unless `autofmt.fmt-onsave` is set to false (with `Ctrl-e > set autofmt.fmt-onsave false`).
## Supported formatters
| Language | Formatter |
| :--------- | :-------------------------------------------------------------- |
| C/C++/C# | [clang-format](https://clang.llvm.org/docs/ClangFormat.html) |
| Python | [yapf](https://github.com/google/yapf) |
| Racket | [fmt](https://docs.racket-lang.org/fmt/index.html) |
| JavaScript | [prettier](https://prettier.io/) |
| Rust | [rustfmt nightly](https://github.com/rust-lang/rustfmt) |
| Go | [gofmt](https://golang.org/cmd/gofmt/) |
| Solidity | [forge fmt](https://book.getfoundry.sh/reference/cli/forge/fmt) |
## Credits
This project is intended as a replacement for the now-dead [fmt-micro](https://github.com/sum01/fmt-micro). o7
---
All contributions are welcome by pull request or issue.
micro-autofmt is licensed under the GNU General Public License v3.0. See [LICENSE](../main/LICENSE) for full text.