Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Allow grammars to specify tab style - #2917

Closed
probablycorey wants to merge 4 commits into
masterfrom
cj-force-hard-tabs
Closed

probablycorey wants to merge 4 commits into
masterfrom
cj-force-hard-tabs

Conversation

@probablycorey

Copy link
Copy Markdown

GNU Make requires the use of hard tabs, but our current setup doesn't allow grammars to specify tab styles. This PR will allow grammars to specify 'requiresHardTabs' which will override any other softTab preference.

BUT

I'm wondering if this approach is too shortsighted. I like what @jtkiley recommends in atom/settings-view#122 (comment). But that will clash with the grammar approach I took here.

Started because of atom/language-make#3 and https://github.com/atom/language-make/pull/8/files

@parabuzzle

Copy link
Copy Markdown

@kevinsawicki what version of atom can I expect this change in? (I will update my pull request on the language-make repo to use this new functionality as soon as it works)

@kevinsawicki

Copy link
Copy Markdown
Contributor

@parabuzzle This PR was closed, not merged. It was a spike that hadn't been updated in a month so I closed it out until it was going to be revisited.

@parabuzzle

Copy link
Copy Markdown

I see that now... We need a solution for makefiles and hard tabs. I liked this solution.. what do you suggest for forced hard tabs (or soft tabs) on specific languages?

@kevinsawicki

Copy link
Copy Markdown
Contributor

This solution worked to force hard tabs in makefiles, but it didn't solve how to make this configurable for both tab type and tab length with package settings, local settings, and project settings.

Ideally, the language packages could provide defaults that could be overridden by the local settings in ~/.atom. Then there could also be project level settings that override the local settings, so you could have a project that uses hard tabs with a width of 4, but still have your defaults to be soft tabs of size two when not in that project.

I didn't want to merge this in and then rip it back out when we add an improved settings system that allows things to be configurable by grammar or file pattern in packages, local settings, and in project settings.

@benogle benogle mentioned this pull request Oct 3, 2014
13 tasks done
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants