I’m interested in building a way to backup and sync Nova preferences (including installed extensions and their preferences) across different Macs, similar to Atom’s sync-settings extension.
Can anyone offer some insight as to whether or not this might be possible with the current Nova extension runtime?
Thanks!
And thanks, Panic, for making such an awesome editor and extensions API. It’s been really fun to work with, which is not something I ever expected to say about a text editor extension API!
Backing up workspace preferences should be easy enough because they are stored in Configuration.json, which is inside the .nova directory in each workspace. So it would just be a matter of backing up that file. See, https://docs.nova.app/extensions/preferences/.
However, I don’t see a way to retrieve all Environment preferences or information about installed extensions. The Configuration object provides the ability to return specific keys using the get method, but not all keys. If I am correct, this might be a good API feature request?
An additional thought…maybe this is a security decision made by Panic? That is that extensions should only have access to their own configurations, especially in the global environment.
While this is clearly outside of any API contract, global extension configuration items are in UserConfiguration.json two levels up from nova.extension.globalStoragePath. But any extension could easily and opaquely store whatever kind of state they want in nova.extension.globalStoragePath, and not use the configuration api at all.
But ++ on having a preferences sync, that would be nice!
Having PanicSync would be the obvious conduit, from a Panic customer POV.
Thanks for pointing out the location of the global configuration @jrf!
I agree completely, PanicSync would seem ideal place to store these preferences. Not sure if this then becomes something Panic would need to bake into Nova itself or if it’s possible this functionality might be opened with an API.