EditorConfig doesn't work in WebStorm 2019.2

here is my .editorconfig file content

```

root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

```

when I update WebStorm from 2019.1.4 to 2019.2

EditorConfig doesn't wort.

I use Ctrl+Alt+L to format my code,but indentation become 4!

check my settings

indent is 4.

but why it was not overridden by editorConfig?

And the warning in red mark is ?

==========

env: windows 10, webstorm 2019.2 build #WS-192.5728.87

==========

what should i do?

4

Same issue for me when I coding .vue files. I tried .js and it worked fine.

But .vue files used to work with .editorconfig well before too.

This happens after I updated to 2019.2.  Is this Vue plugin's problem?

0

@Elena Pogorelova

Forgot to mention minor version, but I'm actually using 2019.2.1 :/

I just checked again and it still happens for .vue file.

 

Oh yea sorry, I'm not using Webstorm. I meant IntelliJ Ultimate 2019.2.1

0

EditorConfig doesn't work with .sh files.

Here is my config:

root = true

[*]
# Change these settings to your own preference
indent_style = space
indent_size = 4

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.sh]
indent_style = tab
indent_size = 4

PhpStorm 2019.3.3

Build #PS-193.6494.47, built on February 12, 2020
Licensed to ***
You have a perpetual fallback license for this version
Subscription is active until December 11, 2020
Runtime version: 11.0.5+10-b520.38 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 5.4.0-3-amd64
GC: ParNew, ConcurrentMarkSweep
Memory: 958M
Cores: 4
Registry: run.processes.with.pty=TRUE
Non-Bundled Plugins: BashSupport, com.intellij.ideolog, com.kalessil.phpStorm.phpInspectionsEA, de.espend.idea.laravel, de.espend.idea.php.annotation, fr.adrienbrault.idea.symfony2plugin, mobi.hsz.idea.gitignore, ru.adelf.idea.dotenv
0

https://youtrack.jetbrains.com/issue/IDEA-221628 is fixed in 2019.3, and I've just checked that it indeed works with your config in 2019.3.3.

Did you install the shfmt? it's required for the formatter to work. PhpStorm normally prompts installing it when you reformat the code

0

I am having the same issue on Rubymine 2019.3.3, using Windows 10 version 1909, with shfmt v3.0.2 installed through scoop.

My `.editorconfig` file content:

<pre>

# Ruby
[*.rb]
indent_style = space
indent_size = 4

</pre>

Enable EditorConfig support is enabled in the settings, but changing `indent_size` does not have not have any effect when applying Reformat Code.

0

I am having the same issue with SQL files in Intellij IDEA Ultimate 2019.3.3.

My .editorconfig is

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file and no trailing spaces
[*]
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true

# Use spaces with indent size of 2
[*.sql]
indent_style = space
indent_size = 2

And I have enabled editorconfig support as the previous post for the SQL dialect I'm using (Postgres).

The editorconfig settings are not having any effect on the SQL editor formatting.

 

0

What files do you work with? It works fine for me when editing .js files

-1

请先登录再写评论。