You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Indent-guess isn't working correctly after switching between spaces and tabs #4054
changed the title [-]Indent-guess isn't working correctly after changing between spaces and tabs[/-][+]Indent-guess isn't working correctly after switching between spaces and tabs[/+]on Nov 4, 2014
Still happening with 1.3.2
This was supposed to be fixed before 1.0, or shortly after. What is the problem? Is there some other issue that must be fixed before this one?
The big issue as reported is the inaccurate "guessing" combined with the inability for an editor-wide setting (and not per-file setting). It may be that several preferences may be required instead of having one monolithic setting which is clearly causing unhappiness:
Default for all files (y/n)
Default for certain files (by file extension)
Setting on per file basis
The idea would be to be able to re-order these in terms of priority, based on the needs of the user.
It may be that several preferences may be required instead of having one monolithic setting which is clearly causing unhappiness
well we have editorconfig for that don't we? I don't want atom taking on the functionality of editorconfig. But I'd love it to guess better and play nicely with editorconfig settings.
Since issues related to soft-/hard-tabs seem to get closed without the root problem being fixed, I'll just add comments here rather than create a new issue, or commenting on one of the closed issues, even though the comments are slightly tangential to the original issue.
Auto-detection of indentation is certainly desirable, especially if it works reliably. That said, per-language indentation settings are not just desirable, they're a requirement. Most languages have some opinion on preferred indentation, and linters will complain if the wrong format is used, some languages with significant white-space will simply break if the wrong indentation is used. Organisations or projects may also dictate white-space for a language via a style guide.
One-size-fits-all indentation makes Atom extremely cumbersome for anyone who works across multiple languages that have incompatible indentation standards.
It appears that #3719 may provide some foundation to build per-language indentation, is this the case? Is there an issue to track this? What's involved?
@50Wliu thanks, I tried searching, but either my google-fu isn't working, or the documentation is lacking. Would also seem sensible to mirror the global tab settings in the language package settings GUI.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!
Activity
[-]Indent-guess isn't working correctly after changing between spaces and tabs[/-][+]Indent-guess isn't working correctly after switching between spaces and tabs[/+]benogle commentedon Nov 4, 2014
A recap of the steps
We will be able to do this once #3719 is in.
alexandernst commentedon Nov 4, 2014
@benogle Good to know you're aware of the bug. Do you plan to fix #3719 (and maybe this bug too?) before 1.0?
benogle commentedon Nov 4, 2014
Yeah, for sure #3719 before 1.0.
alexandernst commentedon Aug 14, 2015
@benogle Now that #3719 got fixed, can we get this one?
alexandernst commentedon Oct 28, 2015
Still happening with 1.0.19
alexandernst commentedon Jan 10, 2016
Still happening with 1.3.2
This was supposed to be fixed before 1.0, or shortly after. What is the problem? Is there some other issue that must be fixed before this one?
alexandernst commentedon Feb 7, 2016
Still happening with Atom 1.4 stable and 1.5.0 beta
winstliu commentedon Feb 7, 2016
Retagging to bug since it seems more like a bug than a feature.
alexandernst commentedon Apr 14, 2016
Still happening with Atom 1.7
sandrodz commentedon May 16, 2016
yep still here.
jeffmcneill commentedon Jun 13, 2016
Most reports of issues seem to be closed without resolving the underlying problem. There is only one open I could find (on cursory clicking):
Closed
Open
The big issue as reported is the inaccurate "guessing" combined with the inability for an editor-wide setting (and not per-file setting). It may be that several preferences may be required instead of having one monolithic setting which is clearly causing unhappiness:
The idea would be to be able to re-order these in terms of priority, based on the needs of the user.
sandrodz commentedon Jun 13, 2016
@jeffmcneill
well we have editorconfig for that don't we? I don't want atom taking on the functionality of editorconfig. But I'd love it to guess better and play nicely with editorconfig settings.
pdf commentedon Oct 3, 2016
Since issues related to soft-/hard-tabs seem to get closed without the root problem being fixed, I'll just add comments here rather than create a new issue, or commenting on one of the closed issues, even though the comments are slightly tangential to the original issue.
Auto-detection of indentation is certainly desirable, especially if it works reliably. That said, per-language indentation settings are not just desirable, they're a requirement. Most languages have some opinion on preferred indentation, and linters will complain if the wrong format is used, some languages with significant white-space will simply break if the wrong indentation is used. Organisations or projects may also dictate white-space for a language via a style guide.
One-size-fits-all indentation makes Atom extremely cumbersome for anyone who works across multiple languages that have incompatible indentation standards.
It appears that #3719 may provide some foundation to build per-language indentation, is this the case? Is there an issue to track this? What's involved?
winstliu commentedon Oct 3, 2016
The tab type and size can already be scoped per-language, and each language can specify their own indentation rules. Some examples are:
https://github.com/atom/language-python/blob/master/settings/language-python.cson
https://github.com/atom/language-sass/blob/master/settings/language-sass.cson
https://github.com/atom/language-yaml/blob/master/settings/language-yaml.cson
pdf commentedon Oct 4, 2016
@50Wliu thanks, I tried searching, but either my google-fu isn't working, or the documentation is lacking. Would also seem sensible to mirror the global tab settings in the language package settings GUI.
winstliu commentedon Oct 4, 2016
Can you elaborate? I believe they already are.
pdf commentedon Oct 4, 2016
Language packages display a GUI setting for
tabLength, but not fortabTypeorsoftTabs.winstliu commentedon Oct 4, 2016
@pdf Can you please open a new issue for that?
Ben3eeE commentedon Oct 4, 2016
@50Wliu atom/settings-view#835
pdf commentedon Oct 4, 2016
Thanks @Ben3eeE, just came to open the issue, have added a note that both settings should probably be displayed.
stale commentedon Oct 4, 2017
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
lock commentedon Apr 16, 2018
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!