rioj7 / command-variable

Visual Studio Code extension for variable substitution via ${command:commandID}
51 stars 9 forks source link

use memento API to persist remembered keys #91

Open dvirtz opened 1 month ago

dvirtz commented 1 month ago

VSCode has a dedicated API to persist data: https://code.visualstudio.com/api/references/vscode-api#Memento Using that would solve the caveats with persistent.file described in https://marketplace.visualstudio.com/items?itemName=rioj7.command-variable#settings such as working with a remote workspace

rioj7 commented 1 month ago

@dvirtz the update method is async and I don't think I can call async stuff in the deactivate method of the extension. VSC has signaled that it is about to remove the extension.

dvirtz commented 1 month ago

I think you can call it on every change instead. Maybe only save it there even.

dvirtz commented 1 month ago

see, for example, https://marketplace.visualstudio.com/items?itemName=spadin.memento-inputs