You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was curious when (if ever) the workspace arg would be undefined, so I started poking through some VSCode docs. While trying to look up information about vscode.ExtensionContext I found some docs that state (emphasis mine):
ExtensionContext.globalState: A global storage where you can write key/value pairs. VS Code manages the storage and will restore it for each extension activation. You can selectively synchronize key/value pairs in global storage by setting the keys for sync using setKeysForSync method on globalState.
On the surface this seems like it would be preferable to use this over manually reading/writing our own files on the user's filesystem.
Not necessarily redundant -- information (ex. some add-on metadata) is still stored using the filesystem rather than globalState when, ideally, it should be the latter.
chrstinalin
changed the title
Switch To Using ExtensionContext.globalState to Store Comments Rather Than On User's Filesystem
Switch To Using ExtensionContext.globalState to Store Information Rather Than On User's Filesystem
Oct 15, 2024
Originally posted by @dotproto in #41 (comment)
The text was updated successfully, but these errors were encountered: