Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Missing API prohibits 2 essential Editorconfig-Options? #116

Closed
florianb opened this issue May 2, 2016 · 2 comments
Closed

Missing API prohibits 2 essential Editorconfig-Options? #116

florianb opened this issue May 2, 2016 · 2 comments
Labels

Comments

@florianb
Copy link

florianb commented May 2, 2016

I am currently investigating strategies to implement the trim_trailing_whitespace and the insert_final_newline-options of .editorconfig for Atom.

As far as i understood is this functionality implemented by this package, modifying the TextBuffer on the onWillSave-event.

In order to implement the editorconfig-setting we would like to act on this event, without running the risk of being "overridden" when the config has f.e. specified that trailing newlines should be added and the .editorconfig says it shouldn't.

I could imagine that just relying on the onWillSave-event could get in conflict with this package.

Is there any way how this could be solved? If there is anything we could do - please give me a call.

Thanks a lot in advance -- 🍰

@florianb florianb changed the title Missing API prohibits 2 essential Editorconfig-Options Missing API prohibits 2 essential Editorconfig-Options? May 2, 2016
@florianb
Copy link
Author

After some input from lee-dohm, i am investigating in handler-registration now. I will be back if my attempt fails. 😸

@florianb
Copy link
Author

florianb commented May 20, 2016

@lee-dohm: Just for your information, i expect to have a problem with preserving the Buffer from being manipulated by the Whitespace-package, f.e. if it removes the trailing whitespaces when editorconfig says it shouldn't.

So i need to reverse the modification, since we expect the WS-package to be called first, the modifications are already made. The only way i see to get around this, is to preserve trailing whitespaces "onChange" which probably gets expensive.

I'll give you another ping when i have a dedicated unit-test online. 💐

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants