tomblachut / svelte-intellij

Svelte components in WebStorm and friends
MIT License
485 stars 38 forks source link

Indentation cannot be changed #109

Closed briskt closed 4 years ago

briskt commented 4 years ago

This may be related to #94 or it may be user error, but I cannot seem to change the indentation settings. Auto-indent features, including paste, use a 4-space indentation regardless of the editor configuration.

andre-luiz-dos-santos commented 4 years ago

Any workarounds for this? Indentation is fixed at 4 spaces.

Using IntelliJ IDEA 2020.1.1

andre-luiz-dos-santos commented 4 years ago

It´s possible to change indentation using an .editorconfig file.

tomblachut commented 4 years ago

@Schparky @andre-luiz-dos-santos Svelte inherits indentation from HTML and JS. You should be able to modify corresponding settings.

briskt commented 4 years ago

@tomblachut thanks, that works for me.

andre-luiz-dos-santos commented 4 years ago

I had installed IntelliJ, changed the indentation for JavaScript files to 2 spaces, and it was immediately working for .js files, but for .svelte files, indentation was still 4 spaces.

Testing again without the .editorconfig file, it seems to be working as you describe, @tomblachut.

Maybe I needed to restart the editor after changing the indentation setting, I don't know. This was on a brand new installation of everything, including the OS.

Anyway, it's working know. Thank you!

tomblachut commented 4 years ago

@Schparky excellent :)

@andre-luiz-dos-santos IDK, it should work from the get go, but I'm happy it worked for you after all 👍