optic icon indicating copy to clipboard operation
optic copied to clipboard

Add ability to disable saving changes to disk

Open Aaronm14 opened this issue 8 years ago • 3 comments

Goal would be to create a flag that allows extensions to explicitly disable saving to disk when you register the connection. Should be a query parameter like /editors/atom?autorefresh=true

Aaronm14 avatar May 27 '18 21:05 Aaronm14

Hey Aaron,

This makes good sense to me. I can see how always saving changes to disk might confuse some editors. It could possibly cause race conditions if Optic sends a files updated before/after the editor is notified of the disk changes.

There's a new feature branch for this that passes all tests, I'll incorporate it in the release coming out this week. feature/autorefreshededitorflag

I've also pushed a new version of the editor sdk. You can get it on the node registry as version 0.1.8.

To use it just pass an option called autorefreshes (it's a boolean, optional and defaults to false)

EditorConnection({name: 'vscode', autorefreshes: true})

Here's a link to a snapshot build of the Optic App with the changes implemented. Can you test your plugin against this build before the release Wednesday and let me know if it works as expected?

acunniffe avatar May 28 '18 04:05 acunniffe

Great, thanks - this update works with version 0.1.9 of the editor sdk!

Aaronm14 avatar May 28 '18 13:05 Aaronm14

Great. Thanks for the help debugging! 🥇

acunniffe avatar May 28 '18 13:05 acunniffe