jetbrains-plugin-st4 icon indicating copy to clipboard operation
jetbrains-plugin-st4 copied to clipboard

Tab-to-indent does not respect indentation settings

Open Clashsoft opened this issue 5 years ago • 4 comments

I'm in an environment where the tab size is set to 3 (via an .editorconfig file, but not sure if that matters). When pressing Tab to indent a line within a template, it always indents by 4 spaces. Interestingly, when pressing Shift-Tab to de-indent, it removes 3 spaces. The correct behaviour would be that Tab indents by 3 spaces as well.

recording

Clashsoft avatar Sep 13 '20 11:09 Clashsoft

Are you guys the same person or what? https://github.com/bjansen/pebble-intellij/issues/48 😄

Thanks for reporting the problem, I should be able to fix it the same way.

bjansen avatar Sep 13 '20 11:09 bjansen

Huh, another one that seems to be already fixed in master, please try the build I mentioned in https://github.com/antlr/jetbrains-plugin-st4/issues/31#issuecomment-691957518

bjansen avatar Sep 14 '20 11:09 bjansen

Actually it's not entirely fixed. If you configure a template data language (for example if you are generating a Java file), then it does not use Java indents. It always uses "Other File Types" indents, which seems to be wrong.

Otherwise, when no template data language is configured, "Other File Types" indents will always be used in .st and .stg files.

bjansen avatar Sep 14 '20 11:09 bjansen

Can confirm that the problem is still there with language injection in the latest snapshot (https://github.com/antlr/jetbrains-plugin-st4/issues/31#issuecomment-691957518)

Clashsoft avatar Sep 14 '20 22:09 Clashsoft