Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Kotlin FormatterNew to Visual Studio Code? Get it now.
Kotlin Formatter

Kotlin Formatter

cstef

|
33,971 installs
| (3) | Free
Format your Kotlin code easily
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Kotlin-Formatter for VSCode

This is just a formatter for Kotlin (.kt) and KotlinScript (.kts)

Requirements

macOS / Linux

Make sure you have ktlint installed before installing this extension

Windows

You need the ktlint jar file and either have it in your project root or specify its location in the vscode settings (ktlintPath)

Using

You can either use the kotlin-formatter.formatKotlin command or set cstef.kotlin-formatter as your default formatter in VScode settings

Format on save

Set cstef.kotlin-formatter as your formatter for kotlin and/or kotlinscript in VScode's settings.json:

    {
        ...
        "[kotlin]": {
            "editor.defaultFormatter": "cstef.kotlin-formatter"
        },
        "[kotlinscript]": {
            "editor.defaultFormatter": "cstef.kotlin-formatter"
        }
        ...
    }
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft