rozPierog / kotlin-formatter

Format your Kotlin code easily in VScode

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kotlin-Formatter for VSCode

This is a Formatter to have for Kotlin (.kt) and KotlinScript (.kts)

Requirements

Make sure you have ktlint installed before installing this extension

This extension currently only supports Linux and macOS, I will add Windows support in a future release

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"
        }
        ...
    }

About

Format your Kotlin code easily in VScode


Languages

Language:TypeScript 100.0%