mathiasfrohlich / vscode-kotlin

Kotlin language support for VS Code
Apache License 2.0
201 stars 21 forks source link

Tabs for indentation #32

Closed kmansoft closed 5 years ago

kmansoft commented 5 years ago

Hi,

Is there a way to get tabs (4 characters wide, not spaces) when using your extension?

That's my personal preference even if it's not Kotlin's official style.

I tried this in VS Code settings JSON file but it seemingly did nothing... Still getting 2 spaces for each Tab press.

"[kotlin]": {
    "editor.tabSize": 4,
},
fwcd commented 5 years ago

AFAIK, that is unrelated to this extension as VSCode handles the indentation. The following precedence order is used to determine which indentation style should be used:

Predominant style in the current text file > Workspace Setting > User Setting

The editor.tabSize setting is probably not what you want, however. Instead you should set: editor.insertSpaces to false.

kmansoft commented 5 years ago

Thanks, it was the "predominant style" at this point and there is a popup (unrelated to your plugin) to change that.