Editorconfig not scoping indent config properly

Answered

Hey folks,

I have an editorconfig which specifies a different indent config for different filetypes (shown below).
Unfortunately intellij seems to be applying the wrong styles to the wrong files. Specifically, when provided with the .editorconfig below it is indenting *.scss files with spaces when the config specifies tabs.
If I remove the bottom two config sections in the file it works fine. I haven't been able to spot an error in the config, so I'm assuming it is an IntelliJ issue. 

root = true

[**{.js,.ts,.html,.hbs,.mustache,.xml,.xsl,.scss,.css,.sh,.vcl,.mk,Makefile}]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab

[**{.json,.yml,.yaml}]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_size = 2
indent_style = space

[*.md]
indent_size = unset
indent_style = unset
trim_trailing_whitespace = false

0
3 comments

Hi Max,

What is the version of your IDE?

0
Avatar
Permanently deleted user

IntelliJ IDEA 2021.1.1 (Ultimate Edition)
Build #IU-211.7142.45, built on April 30, 2021
Runtime version: 11.0.10+9-b1341.41 x86_64
VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o.
macOS 11.3.1
GC: ParNew, ConcurrentMarkSweep
Memory: 16300M
Cores: 12
Non-Bundled Plugins: com.intellij.apacheConfig (211.6693.108), com.intellij.ideolog (203.0.27.0), com.jetbrains.plugins.ini4idea (211.6693.44), mobi.hsz.idea.latex (0.2), org.intellij.plugins.hcl (0.7.10), org.jetbrains.plugins.go-template (211.6693.44), name.kropp.intellij.makefile (211.6693.108), org.toml.lang (0.2.146.3826-211), com.intellij.kubernetes (211.7142.13), String Manipulation (8.15.203.000.3), intellij.prettierJS (211.7142.13), com.dmarcotte.handlebars (211.6693.44), org.jetbrains.kotlin (211-1.5.0-release-759-IJ6693.72), com.intellij.lang.jsgraphql (2.9.1), com.jetbrains.php (211.7142.45), com.jetbrains.twig (211.6693.44), org.jetbrains.plugins.ruby (211.7142.36), Pythonid (211.7142.45), nl.rubensten.texifyidea (0.7.6), org.jetbrains.plugins.go (211.7142.36), net.ashald.envfile (3.2.1), ru.adelf.idea.dotenv (2021.1), org.rust.lang (0.3.146.3826-211)
Kotlin: 211-1.5.0-release-759-IJ6693.72

0

Thank you.

I can't seem to reproduce the issue locally. Could you provide a sample .scss file where this config does not apply and specify where you are expecting tabs but getting spaces?

0

Please sign in to leave a comment.