Formatting
Built-in formatter
Formatting · 1 min read
Tidies your code for you - puts the spaces, indents and line breaks in the same places every time.
When you would want it
Arguing about where the spaces go is the least valuable thing a person can do with their day. A formatter ends the argument by always doing the same thing.
Where to find it
- All Features → Built-in formatter
- Format this file
- Turn on or off
- Settings
- Keyboard → Shift+Alt+F
What you get out of it
- One shortcut ends spaces-versus-tabs debates permanently.
- Zero installation - the formatter ships inside the editor, with language-server upgrade built in.
How to use it, step by step
- Press Shift+Alt+F anywhere in a file.
- If a language server is running for that language, Agentfly asks it - it understands the language more precisely.
- Otherwise Agentfly's own built-in formatter does the tidying.
- A language nothing can format is left untouched rather than damaged.
Why this beats the usual way
Configuring a formatter per language is the setup chore that eats an afternoon. A built-in default that defers to a language server when one exists gives you the right answer from the first file.
Shortcut
Shift+Alt+F
Find it in Universal Search
Built-in formatter · Formatting