When creating a theme, is it somehow possible to toggle package options?


I’m currently developing a theme called material-ui and I’d like to make the theme enable a certain package’s option after activation (and only after it was activated).

Is that even possible? And if yes, how? :innocent:


I’m not sure that’s a good idea, package configuration is very much user space and packages shouldn’t go in there and change stuff around.

That disclaimer out of the way though, I bet you can do tricks like atom.config.get to check if a configuration is there at all (i.e. the package is installed) en atom.config.set to change values.


Awesome, thanks!


I have to agree with @braver that changing a user’s settings without informing them and without their consent is just going to cause problems, most likely for the Atom team rather than for you. (I can hear it now, “Atom is randomly changing my settings! I want to love Atom but I can’t until this is fixed! :rage:”)

Related: Why is there no programmatic access to the Start Menu pin list? by Raymond Chen


I’m still thinking about how to inform them. Because I definitely don’t just want to add a “suggested settings” section to my documentation. But I also think that enabling (in my case) previewTabs isn’t much of a big deal, especially since it’s mostly UI-related (which will change anyway, because of the newly installed theme).

But in the end, I completely understand your point. I also don’t want my editor’s major settings to simply be changed without me knowing about it.