Config vs ConfigDefault and a "hidden" Config



Is there any difference between config and configDefaults? I didn’t find any documentation about it, and it appears to have basically the same behavior.

Also, I couldn’t find anything like a hidden config. Something that I could use to store package states/settings but that would not appear in Settings. Or do I have to save on a new file, specific to my package?

Thanks in advance

How to store passwords in a config field?

configDefaults is the old method of specifying configuration information for your package. config is the new method using JSON Schema:

The new method is much more extensive and powerful, you should be using it.

Yes, anything that you put in the user’s config.cson using the config schema or atom.config.set will show up in the Settings View for your package. If you want something that definitely will not show up in the Settings View, then you need to store it someplace else.


Wow, that was fast!!! This forum is just another reason why I prefer Atom :smile:

Thanks for your help.


When I first visited this forum I accused @leedohm of being a bot. It seems like he gives fast response 24/7. Believe it or not he doesn’t work for github and he has a day job.

Edit: A new theory: There are actually three of four people using his account.


Has anyone done a linguistic analysis of his posts?


You’ll never catch me copper!!!


By other place do you mean you have create your own file like Project Manager does?


Yes. It’s an idea :smile:

I’m still thinking if adding a Feature Request / Enhancement to support it on config itself would be valid/accepted, but until now, this workaround is a good start…


@Trudko I mean store it some place else … whether that’s your own file, or Local Storage, or in the cloud, or whatever you can think of :grinning:

@alefragnani It might, but why? As I mentioned to @Trudko, there are so many options at hand that there isn’t much point of including it inside config.cson.


@leedohm That’s why I’m still thinking. Neither I convinced myself :smile:. But maybe (just maybe) could have something in the core (similar to config.cson) for this purpose.

For instance, the Exception Reporting package (delivered in the base install) has a config to store User Id, that appears in the Settings view. But what is the meaning/purpose of that to the user? It could be hidden.

Thanks again


I’m of the opinion that configuration for packages should never be hidden from the user. It’s their system after all. On the other hand, package-specific state is a different story and it is fine if that is somewhat non-obvious (though I still think it should be stored under the ~/.atom directory for simplicity’s sake). For example, the ~/.atom/storage directory stores serialized view state and there isn’t a way of surfacing that information in the UI.


I totally agree that configurations should not hidden. I guess I misused the term hidden config. What I’m looking for is exactly a package-specific state, like store the line that the cursor was when a file was closed, so it could be recovered when that file as reopened.

I think that this could be something available in the core, because to me it appears to be something so obvious/usefull. And being in the core, it avoids each package doing on its own way. It also helps if you intend do make backups of your settings, because it has a standard place.

In the User Id example that I wrote before, I think that it could be, at least, a read only config, being simply informative to the user.


If you’re looking for package-specific state, have you taken a look at the Serialization support to see if it will work for your uses?


No, I didn’t know about serialization, but I will take a look. Thanks…