How do I save/store my package data in Atom?


#1

Lets say I want to store user parameters or a package variable so that when they next open atom I can restore the packages state etc. How would I go about this?

Save a hidden file (how would I go about doing that?) or is there an Atom API to save stuff?

Any help greatly appreicated, thanks!


#2

There are various frameworks for storing package information. There is the Configuration API for storing user configuration information. For storing package state, there is package state serialization. And yes, you can also store files containing whatever data you want if neither of those work for you. Depending on what you want to store, you may want to store them in the ~/.atom directory or elsewhere.