sindresorhus / atom-editorconfig

Helps developers maintain consistent coding styles between different editors
https://atom.io/packages/editorconfig
MIT License
812 stars 80 forks source link

.editorconfig not applied #185

Closed codeofsumit closed 7 years ago

codeofsumit commented 7 years ago

Involved .editorconfig-files

root = true

[*]
indent_style = space
indent_size = 4

Directory structure

sorry I don't know what tree is (not installed) image

Installed packages

Built-in Atom Packages (89)
├── atom-dark-syntax@0.28.0
├── atom-dark-ui@0.53.0
├── atom-light-syntax@0.29.0
├── atom-light-ui@0.46.0
├── base16-tomorrow-dark-theme@1.5.0
├── base16-tomorrow-light-theme@1.5.0
├── one-dark-ui@1.9.1
├── one-light-ui@1.9.1
├── one-dark-syntax@1.7.1
├── one-light-syntax@1.7.1
├── solarized-dark-syntax@1.1.2
├── solarized-light-syntax@1.1.2
├── about@1.7.2
├── archive-view@0.62.2
├── autocomplete-atom-api@0.10.0
├── autocomplete-css@0.15.0
├── autocomplete-html@0.7.2
├── autocomplete-plus@2.34.2
├── autocomplete-snippets@1.11.0
├── autoflow@0.29.0
├── autosave@0.24.0
├── background-tips@0.26.1
├── bookmarks@0.44.1
├── bracket-matcher@0.85.2
├── command-palette@0.40.1
├── deprecation-cop@0.56.2
├── dev-live-reload@0.47.0
├── encoding-selector@0.23.1
├── exception-reporting@0.41.0
├── find-and-replace@0.206.3
├── fuzzy-finder@1.4.1
├── git-diff@1.3.1
├── go-to-line@0.32.0
├── grammar-selector@0.49.1
├── image-view@0.60.0
├── incompatible-packages@0.26.1
├── keybinding-resolver@0.36.1
├── line-ending-selector@0.6.1
├── link@0.31.2
├── markdown-preview@0.159.6
├── metrics@1.1.3
├── notifications@0.66.2
├── open-on-github@1.2.1
├── package-generator@1.1.0
├── settings-view@0.247.0
├── snippets@1.0.5
├── spell-check@0.70.2
├── status-bar@1.8.1
├── styleguide@0.49.2
├── symbols-view@0.114.0
├── tabs@0.104.1
├── timecop@0.34.0
├── tree-view@0.214.1
├── update-package-dependencies@0.10.0
├── welcome@0.36.0
├── whitespace@0.36.2
├── wrap-guide@0.39.0
├── language-c@0.56.0
├── language-clojure@0.22.2
├── language-coffee-script@0.48.5
├── language-csharp@0.14.2
├── language-css@0.42.0
├── language-gfm@0.88.1
├── language-git@0.19.0
├── language-go@0.43.1
├── language-html@0.47.2
├── language-hyperlink@0.16.1
├── language-java@0.26.0
├── language-javascript@0.126.1
├── language-json@0.18.3
├── language-less@0.30.1
├── language-make@0.22.3
├── language-mustache@0.13.1
├── language-objective-c@0.15.1
├── language-perl@0.37.0
├── language-php@0.37.4
├── language-property-list@0.9.0
├── language-python@0.45.2
├── language-ruby@0.70.5
├── language-ruby-on-rails@0.25.2
├── language-sass@0.57.1
├── language-shellscript@0.25.0
├── language-source@0.9.0
├── language-sql@0.25.3
├── language-text@0.7.1
├── language-todo@0.29.1
├── language-toml@0.18.1
├── language-xml@0.34.16
└── language-yaml@0.28.0

Community Packages (16) /Users/sumitkumar/.atom/packages
├── autoclose-html@0.23.0
├── busy-signal@1.3.0
├── cobalt2-syntax@0.5.1
├── editorconfig@2.2.2
├── emmet@2.4.3
├── file-icons@2.0.17
├── highlight-selected@0.12.0
├── intentions@1.1.2
├── language-vue@0.21.2
├── linter@2.1.0
├── linter-eslint@8.1.3
├── linter-ui-default@1.1.0
├── minimap@4.26.8
├── open-in-browser@0.4.7
├── pigments@0.39.0
└── tree-view-git-status@1.3.1

The editor still shows 2 spaces indentation image

If I change the style to tabs it still goes for spaces. So I think the .editorconfig isn't applied at all.

What am I doing wrong?

florianb commented 7 years ago

Hi @codeofsumit, thanks for reporting that. I'm sorry for the confusion about tree i have to change that.

Could you please invoke the EditorConfig: Show Status command in that misformatted file and paste the output here? I would like to know which attributes are being applied.

codeofsumit commented 7 years ago

You mean Show State? image

That's the output for the file mentioned in my previous comment. image

Mhhh now after waking up the mac again, I reopened all the files and it seems to be working. I relaunched atom yesterday and reopened the files with no luck. Now updating the configfile automatically changes the settings for every file, opened or not 🎉

I close this then - sorry about this. It somehow fixed itself :) Thanks for the fast reply!

florianb commented 7 years ago

No worries, thank you for reporting the issue. I guess this may be caused by a community package. I will dig into this as soon as i have some spare time. :)