Skip to content
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

Way to manage local config #25

Open
a-b-r-o-w-n opened this issue Jul 13, 2015 · 6 comments
Open

Way to manage local config #25

a-b-r-o-w-n opened this issue Jul 13, 2015 · 6 comments

Comments

@a-b-r-o-w-n
Copy link
Contributor

Is there a way for people to have some local config that doesn't need to be a shared setting and won't mess with git tracking?

I am specifically wondering about font size, which is stored in the config but is not a setting that needs to be shared.

@aaronjensen
Copy link
Member

Yeah, this is a good question. I think candidates are:

  • font size
  • font
  • theme

@substantial-philipbjorge
Copy link
Contributor

I propose being able to configure the project pane being on the left/right side as well.

@aaronjensen
Copy link
Member

i generally want to hide it...

@radamant
Copy link
Contributor

I hide it too

On Tue, Jul 14, 2015 at 11:16 AM, Aaron Jensen [email protected]
wrote:

i generally want to hide it...

Reply to this email directly or view it on GitHub:
#25 (comment)

@aaronjensen
Copy link
Member

@radamant I just added a key binding for it because cmd-\ didn't work for me... (it's ctrl-- (dash))

@aaronjensen
Copy link
Member

So this will work for a personal.cson:

fs = require 'fs'
path = require 'path'
CSON = require path.join(atom.getLoadSettings().resourcePath, '/node_modules/season')

personalPath = path.join(path.dirname(atom.config.getUserConfigPath()), "personal.cson")

if fs.existsSync(personalPath)
  config = CSON.readFileSync(personalPath)

  for own scopeSelector, scopeConfig of config
    for own namespace, namespaceConfig of scopeConfig
      for own key, value of namespaceConfig
        atom.config.set "#{namespace}.#{key}", value, scopeSelector

But it has a problem... it writes the changes to config.cson, which means that file will be perpetually dirty. That's probably not a big deal but it is somewhat of a burden for updating since you'll need to stash, rebase, apply, deal w/ merge conflicts, etc.

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

No branches or pull requests

4 participants