-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working in Atom 1.12.* #25
Comments
Same here with Atom 1.12.2 on Linux (I don't think the platform is relevant). |
I noticed that whatever sindresorhus/atom-editorconfig is doing, it is not affected by Atom's update and when I work on projects with a You may want to take a look at how it is applying the settings. |
Maybe this is the same as #23, which I filed a few weeks ago. See also atom/atom#13141 which I filed on Atom core. |
+1 |
I'm investigating a fix for this at https://github.com/forivall/auto-detect-indentation/tree/pane-focus-change-fix . I still need to update it so that the indentation is only automatically detected on first open, and then stored in a weak map. Also, there needs to be coordination with atom-editorconfig, since both packages will load the indentation settings if they have no settings of their own to set. This will override the other's setting, depending on which gets invoked last. Specifically, https://github.com/jtokoph/auto-detect-indentation/blob/06b3abdf/lib/indentation-manager.coffee#L75 and https://github.com/sindresorhus/atom-editorconfig/blob/6dd0a62d/index.js#L143 conflict with each other. I'm thinking of: |
I tried disabling atom-editorconfig. It doesn’t appear to be related. |
Yup, did some more digging, and it's also because https://github.com/atom/atom/blob/18ddcf9/src/text-editor-registry.js#L327 (called by https://github.com/atom/atom/blob/18ddcf9/src/text-editor-registry.js#L154) is run after auto-detect-indentation sets the indentation, and the . Although, appearances can be deceiving. Editorconfig also does conflict, but the text-editor-registry conflict is more important. So I'll look into the text-editor-registry conflict first. It could mean monkey patching something in text-editor-registry, and if both editorconfig and auto-detect-indentation would have to make use of a monkey patch, I'd want them to use the same monkey patch. (so I'd still use one of the above solutions) Or, just delaying after TextEditorRegistry's PS ugh, promise microtask queue. blink's async stack trace is my only hope |
A workaround for this issue while it is being addressed: Save (Ctrl+S) after opening a file. Saving also triggers indentation detection, and will happen after the promises this way. |
I am noticing the same behavior. When I save the file it correctly detects the indentation. |
My current workaround is defining language-specific indentations. E.g. in the package settings for |
Yesterday I've updated to Atom 1.12.0 and this plugin doesn't work anymore.
I'm on Windows 10 64 bits.
Thanks!
The text was updated successfully, but these errors were encountered: