Coder Social home page Coder Social logo

Comments (33)

rochapablo avatar rochapablo commented on May 21, 2024 5

+1

from atom-editorconfig.

kaifaust avatar kaifaust commented on May 21, 2024 3

Removing the "whitespace" plugin from config.cson and restarting atom solved this for me.

from atom-editorconfig.

ezekg avatar ezekg commented on May 21, 2024

My config file has been having issues being picked up as well. Does editorconfig require the default whitespace plugin to be enabled?

from atom-editorconfig.

ismay avatar ismay commented on May 21, 2024

My config file has been having issues being picked up as well.

Same problem here, for example, when saving a .js file in version 0.208.0, editorconfig does not trim trailing whitespace with the following config:

# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

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

[*.js]
indent_style = space
indent_size = 2

When I add some trailing whitespace and move my cursor (by pressing down or up arrow key) it clears all whitespace correctly on save. But when I add trailing whitespace, and don't move my cursor away after pressing spacebar, then it doesn't remove the trailing whitespace.


edit: this is because of the core whitespace package, which was set to ignore whitespace on the current line.

from atom-editorconfig.

lucasmotta avatar lucasmotta commented on May 21, 2024

+1

from atom-editorconfig.

brandonb927 avatar brandonb927 commented on May 21, 2024

Ok I thought I was going crazy when on load It looks like Atom 1.0 is going to use my .editorconfig, however after about 2 seconds it reverts back to the Atom settings config and not using my projects .editorconfig.

+1 on this issue

from atom-editorconfig.

bobrocke avatar bobrocke commented on May 21, 2024

@brandonb927 This has proven to be a difficult mess. And I know the Atom folks have struggles with the "right" solution in the case of the file content, .editorconfig, and Atom's preferences differing. I don't think I've worked out how the conflict is handled within Atom.

If you hand edit your file to make it conform to your .editorconfig settings, will Atom respect that on load even if Atom's preferences are different?

from atom-editorconfig.

brandonb927 avatar brandonb927 commented on May 21, 2024

I'm not sure what you mean by "hand edit"? Do you mean that I should just edit the cson file manually to have it reflect my .editorconfig settings?

from atom-editorconfig.

bobrocke avatar bobrocke commented on May 21, 2024

Yes.

from atom-editorconfig.

brandonb927 avatar brandonb927 commented on May 21, 2024

That... is not ideal :) I have an editorconfig in many projects I work on daily, switching between them frequently too. You're saying I should manually edit the Atom config whenever I switch then?

from atom-editorconfig.

bobrocke avatar bobrocke commented on May 21, 2024

No. I'm saying that Atom does not seem to handle .editorconfig, it's preferences, and what it finds in a file well if they don't all match up. I was suggesting a way to fix that for one file - make that file match .editorconfig and see if that "sticks."

from atom-editorconfig.

brandonb927 avatar brandonb927 commented on May 21, 2024

Ah, simple misunderstanding. I'll try that and see if it works.

from atom-editorconfig.

bobrocke avatar bobrocke commented on May 21, 2024

@lee-dohn has written up a bunch on the topic.

from atom-editorconfig.

nfantone avatar nfantone commented on May 21, 2024

+1 on this.

I have absolutely no idea on how this package works, but it sure does not apply my .editorconfig settings. What am I supposed to do? Autoindent? How does this indent my source files, exactly? Is there any kind of magic keyboard shortcut? Does Whitespace need to be disabled?

from atom-editorconfig.

gitgrimbo avatar gitgrimbo commented on May 21, 2024

Hi,

I deleted the following two lines from C:\Users\xxx\.atom\config.cson and when I restarted Atom my .editorconfig settings seemed match the formatting when I beautify (Ctrl+Alt+B), but not when I edit (auto-indentation isn't correct, for example).

    softTabs: false
    tabLength: 4

from atom-editorconfig.

c4milo avatar c4milo commented on May 21, 2024

I was having the same problem. Once I re-opened my source file, it picked up my editorconfig settings just fine.

from atom-editorconfig.

brandonb927 avatar brandonb927 commented on May 21, 2024

Atom seems to be picking up on my config now

from atom-editorconfig.

brandonb927 avatar brandonb927 commented on May 21, 2024

Hmm I realized that Atom also stopped picking up my config a few releases ago :(

from atom-editorconfig.

bux avatar bux commented on May 21, 2024

Same here.

from atom-editorconfig.

marcelombc avatar marcelombc commented on May 21, 2024

+1

from atom-editorconfig.

zebateira avatar zebateira commented on May 21, 2024

👍

from atom-editorconfig.

nfantone avatar nfantone commented on May 21, 2024

Maybe it wasn't such a good idea to close the issue?

from atom-editorconfig.

EloB avatar EloB commented on May 21, 2024

+1, re-open this?

from atom-editorconfig.

jbatte47 avatar jbatte47 commented on May 21, 2024

+1, not working for me

from atom-editorconfig.

jaimeschettini avatar jaimeschettini commented on May 21, 2024

+1

from atom-editorconfig.

 avatar commented on May 21, 2024

+1

from atom-editorconfig.

matias91 avatar matias91 commented on May 21, 2024

+1

from atom-editorconfig.

garretmh avatar garretmh commented on May 21, 2024

+1

from atom-editorconfig.

verlok avatar verlok commented on May 21, 2024

+1

from atom-editorconfig.

florianb avatar florianb commented on May 21, 2024

@rochapablo: I would really appreciate if you could open a "new" issue with details about your problems.

For anyone else landing here: The atom-editorconfig-plugin is in a stable and mostly tested state and should work as intended.

The editor might behave unexpected if third-party plugins or languages conflict with the editorconfig-settings and/or the file is already malformed according to the editorconfig-rules.

ℹī¸ Please open a new issue in that case - we're happy to help.

P.s.: please do not post to this issue. Since the plugin has evolved a bit in the past weeks it is absolutely unlikely that your issue belongs in any way to the reasons why this was opened in the first place.

from atom-editorconfig.

noahehall avatar noahehall commented on May 21, 2024

this doesnt work

from atom-editorconfig.

florianb avatar florianb commented on May 21, 2024

@noahehall: Please read my comment above - if you're facing any issues please open a new issue and consider especially:

The editor might behave unexpected if third-party plugins or languages conflict with the editorconfig-settings and/or the file is already malformed according to the editorconfig-rules.

from atom-editorconfig.

hiddentao avatar hiddentao commented on May 21, 2024

@kaifaust That worked for me too, thanks.

from atom-editorconfig.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤ī¸ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.