sindresorhus / atom-editorconfig

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

end_of_line not working #158

Closed ChristianSchramm closed 7 years ago

ChristianSchramm commented 7 years ago

Hey there,

since the last updates ig got some problem with line-endings.

.editorconfig is set to line-ending lf, but it doesn't work for atom.

http://editorconfig.org

root = true

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

Active state is end_of_line = \n. But i got mixed or crlf instead of lf.

Notification:

Tab Type: You editor's configuration setting "Tab Type" (currently "soft" prevents the editorconfig-property indent_style from working. "Tab Type" must be set to "auto" to fix this issue.

whitespace: It is likely that the whitespace-package prevents the following properties from working reliably: insert_final_newline, trim_trailing_whitespace. You may deactivate or disable the whitespace-package to fix that issue.

Active Configuration Editorconfig-Property Applied Setting end_of_line \n charset utf8 indent_style space indent_size/ tab_width 2 insert_final_newline true trim_trailing_whitespace true max_line_length auto (auto: atom-editorconfig is not influencing that behavior. A full description of the properties can be found on editorconfig.org.)

florianb commented 7 years ago

hi @ChristianSchramm - thanks for reporting that issue. I need more information to be able to help you:

Thanks in advance! πŸ’

ChristianSchramm commented 7 years ago

Hey,

I hope it helps to find a solution. Thanks

Built-in Atom Packages (89) β”œβ”€β”€ atom-dark-syntax@0.27.0 β”œβ”€β”€ atom-dark-ui@0.52.0 β”œβ”€β”€ atom-light-syntax@0.28.0 β”œβ”€β”€ atom-light-ui@0.45.0 β”œβ”€β”€ base16-tomorrow-dark-theme@1.3.0 β”œβ”€β”€ base16-tomorrow-light-theme@1.3.0 β”œβ”€β”€ one-dark-ui@1.6.2 β”œβ”€β”€ one-light-ui@1.6.2 β”œβ”€β”€ one-dark-syntax@1.5.0 β”œβ”€β”€ one-light-syntax@1.5.0 β”œβ”€β”€ solarized-dark-syntax@1.0.5 β”œβ”€β”€ solarized-light-syntax@1.0.5 β”œβ”€β”€ about@1.7.0 β”œβ”€β”€ archive-view@0.62.0 β”œβ”€β”€ autocomplete-atom-api@0.10.0 β”œβ”€β”€ autocomplete-css@0.13.1 β”œβ”€β”€ autocomplete-html@0.7.2 β”œβ”€β”€ autocomplete-plus@2.31.4 β”œβ”€β”€ autocomplete-snippets@1.11.0 β”œβ”€β”€ autoflow@0.27.0 β”œβ”€β”€ autosave@0.23.1 β”œβ”€β”€ background-tips@0.26.1 β”œβ”€β”€ bookmarks@0.42.0 β”œβ”€β”€ bracket-matcher@0.82.2 β”œβ”€β”€ command-palette@0.39.0 β”œβ”€β”€ deprecation-cop@0.54.1 β”œβ”€β”€ dev-live-reload@0.47.0 β”œβ”€β”€ encoding-selector@0.22.0 β”œβ”€β”€ exception-reporting@0.40.0 β”œβ”€β”€ find-and-replace@0.202.2 β”œβ”€β”€ fuzzy-finder@1.4.0 β”œβ”€β”€ git-diff@1.1.0 β”œβ”€β”€ go-to-line@0.31.0 β”œβ”€β”€ grammar-selector@0.48.2 β”œβ”€β”€ image-view@0.60.0 β”œβ”€β”€ incompatible-packages@0.26.1 β”œβ”€β”€ keybinding-resolver@0.35.0 β”œβ”€β”€ line-ending-selector@0.5.0 β”œβ”€β”€ link@0.31.2 β”œβ”€β”€ markdown-preview@0.158.8 β”œβ”€β”€ metrics@1.1.2 β”œβ”€β”€ notifications@0.65.1 β”œβ”€β”€ open-on-github@1.2.1 β”œβ”€β”€ package-generator@1.0.1 β”œβ”€β”€ settings-view@0.243.1 β”œβ”€β”€ snippets@1.0.4 β”œβ”€β”€ spell-check@0.68.4 β”œβ”€β”€ status-bar@1.4.1 β”œβ”€β”€ styleguide@0.47.2 β”œβ”€β”€ symbols-view@0.113.1 β”œβ”€β”€ tabs@0.103.0 β”œβ”€β”€ timecop@0.33.2 β”œβ”€β”€ tree-view@0.210.0 β”œβ”€β”€ update-package-dependencies@0.10.0 β”œβ”€β”€ welcome@0.35.1 β”œβ”€β”€ whitespace@0.35.0 β”œβ”€β”€ wrap-guide@0.38.2 β”œβ”€β”€ language-c@0.54.0 β”œβ”€β”€ language-clojure@0.22.1 β”œβ”€β”€ language-coffee-script@0.48.0 β”œβ”€β”€ language-csharp@0.13.0 β”œβ”€β”€ language-css@0.40.1 β”œβ”€β”€ language-gfm@0.88.0 β”œβ”€β”€ language-git@0.15.0 β”œβ”€β”€ language-go@0.43.0 β”œβ”€β”€ language-html@0.46.1 β”œβ”€β”€ language-hyperlink@0.16.1 β”œβ”€β”€ language-java@0.24.0 β”œβ”€β”€ language-javascript@0.122.0 β”œβ”€β”€ language-json@0.18.3 β”œβ”€β”€ language-less@0.29.6 β”œβ”€β”€ language-make@0.22.2 β”œβ”€β”€ language-mustache@0.13.0 β”œβ”€β”€ language-objective-c@0.15.1 β”œβ”€β”€ language-perl@0.37.0 β”œβ”€β”€ language-php@0.37.3 β”œβ”€β”€ language-property-list@0.8.0 β”œβ”€β”€ language-python@0.45.1 β”œβ”€β”€ language-ruby@0.70.2 β”œβ”€β”€ language-ruby-on-rails@0.25.1 β”œβ”€β”€ language-sass@0.57.0 β”œβ”€β”€ language-shellscript@0.23.0 β”œβ”€β”€ language-source@0.9.0 β”œβ”€β”€ language-sql@0.25.0 β”œβ”€β”€ language-text@0.7.1 β”œβ”€β”€ language-todo@0.29.1 β”œβ”€β”€ language-toml@0.18.1 β”œβ”€β”€ language-xml@0.34.12 └── language-yaml@0.27.1

Community Packages (37) C:\Users\Christian Schramm.atom\packages β”œβ”€β”€ atom-beautify@0.29.13 β”œβ”€β”€ atom-jade@0.3.0 β”œβ”€β”€ atom-monokai@0.10.4 β”œβ”€β”€ auto-indent@0.5.0 β”œβ”€β”€ blame@0.10.0 β”œβ”€β”€ color-picker@2.2.3 β”œβ”€β”€ compare-files@0.8.0 β”œβ”€β”€ compass@0.9.1 β”œβ”€β”€ editorconfig@2.0.5 β”œβ”€β”€ emmet@2.4.3 β”œβ”€β”€ git-history@3.2.0 β”œβ”€β”€ git-plus@5.25.3 β”œβ”€β”€ git-time-machine@1.5.4 β”œβ”€β”€ jade-autocompile@0.8.3 β”œβ”€β”€ jade-snippets@0.5.0 β”œβ”€β”€ keybinding-cheatsheet@0.1.1 β”œβ”€β”€ language-jade@0.7.2 β”œβ”€β”€ linter@1.11.18 β”œβ”€β”€ linter-jscs@4.1.0 β”œβ”€β”€ linter-jshint@3.0.1 β”œβ”€β”€ linter-jsonlint@1.3.0 β”œβ”€β”€ linter-scss-lint@3.0.4 β”œβ”€β”€ merge-conflicts@1.4.4 β”œβ”€β”€ minimap@4.25.6 β”œβ”€β”€ minimap-git-diff@4.3.1 β”œβ”€β”€ monokai@0.18.0 β”œβ”€β”€ pigments@0.37.0 β”œβ”€β”€ project-manager@3.3.3 β”œβ”€β”€ project-quick-open@0.5.0 β”œβ”€β”€ seti-icons@1.3.4 β”œβ”€β”€ seti-syntax@1.0.1 β”œβ”€β”€ seti-ui@1.3.2 β”œβ”€β”€ sort-lines@0.14.0 β”œβ”€β”€ tabs-to-spaces@1.0.2 β”œβ”€β”€ terminal-panel@1.14.1 β”œβ”€β”€ todo-show@1.8.0 └── trailing-spaces@0.3.2

└── (empty)

florianb commented 7 years ago

Thanks @ChristianSchramm -- i am not sure if i got you right.

You get wrong line endings after pressing enter when your file already contains mixed line endings?

Did you try to invoke EditorConfig: Fix File beforehand?

ChristianSchramm commented 7 years ago

Hey there,

found the solution. I'm using Windows and maybe some update changed my global config. So this ticket can be closed.

Sorry for that, but thanks for your fast response.

florianb commented 7 years ago

Great news! Happy coding! β˜•οΈ