Repository navigation
Add scoped settings to user config - #3718
Conversation
One vote for allowing all to be scoped. It makes life simple and I see no On Fri, Oct 3, 2014 at 12:30 PM, Ben Ogle [email protected] wrote:
|
|
All I listed, or all in the editor? I was planning on scoping all I listed. |
15963f2 to
7969c81
Compare
|
@benogle If See: atom/wrap-guide#15 Two other questions:
|
|
Yes, this would simplify that PR. It would just need to read the config based on the grammar's scope.
|
ad188e1 to
f03ca5f
Compare
I was thinking something similar. |
There was a problem hiding this comment.
I'd really like specs to read correctly including the word "it". What about: it "assigns ::softWrapped based on the top-level grammar scope"
There was a problem hiding this comment.
It actually no longer assigns ::softWrapped unless explicitly set by the ::setSoftWrapped method.
There was a problem hiding this comment.
We don't support variable length tabs in a single file currently. Does it make sense to take a scopeDescriptor considering that fact? Should we always just use the root?
There was a problem hiding this comment.
Yeah, I should take this out. I had dreams of making it support different lengths within the file based on cursor scope.
|
Depends on atom/scoped-property-store#3 |
|
👏 Glad you took the time to scope all these properties. People are going to be happy they can finally do per-grammar settings.
|
|
I am happy with this. Plan on merging tomorrow. |
1906c68 to
c154b8f
Compare
Add scoped settings to user config
|
Messing around with this so far right now ... works great! 👏 🎉 |
|
This is bloody brilliant! Can kill the Overrides package now, created by @lee-dohm and myself. Yeehaaaw 😁 |
|
@thomasjo Well, maybe wait until v0.137.0 gets released. I only use official releases on my work computer 😆 |
|
What's the final format for this configure? Totally lost by here and can't get it work in my Atom 1.10.2 |
Status: Donezo
Building on #3674, the plan is to allow for scoped configuration of editor settings. This solves the problem of "I only want to soft wrap in markdown documents", "I need hard tabs for make", "I want 2 space tabs for ruby and 4 space tabs for python", etc.
The settings
Here are the settings I plan on scoping:
Language packages will be able to set these settings in their
scoped-propertiescson files.Comment if you have suggestions about settings that should / should not be scoped.
User config file format
The user will also be able to override these settings in their config file. The plan right now is to place all the current settings under a
globalkey, then any overridden scoped settings under their scope. Check it:In this example, all languages other than ruby will use 4 space tabs, and ruby will use 2. Additionally, markdown files will be wrapped. One neat thing, because of scoping, is that code blocks in markdown will not be wrapped in this case.
Backward compatibility
The config file will be read in as it is today. It will check for a
globalkey, and if not there assume the old format. Upon writing the file back out, it will write out with global config under theglobalkey.TODO
Prior Art
Refs #2593, atom/language-make#3, #2917
Depends on #3697, atom/scoped-property-store#3