pluto-vscode icon indicating copy to clipboard operation
pluto-vscode copied to clipboard

Use VS Code to handle files

Open fonsp opened this issue 3 years ago • 2 comments

Instead of Pluto's file manager. This means:

  • [x] No more file UI at the top of Pluto
  • [X] Knowing when VS Code renames/moves a file and update Pluto to match. This means that users will use the existing VS Code API to rename/move/delete files, which is very cool!
  • [x] Knowing when VS Code deletes a file and update Pluto to match. This means that users will use the existing VS Code API to rename/move/delete files, which is very cool!
  • [ ] Maybe register a command / add a button to rename the notebook file?
  • [ ] Turn on file watching in Pluto by default

fonsp avatar Sep 23 '21 12:09 fonsp

@pankgeorg @pankgeorg @pankgeorg yay

fonsp avatar Nov 09 '21 09:11 fonsp

@fonsp renaming of files and stuff works like a charm. Pluto doesn't (at this point and against @pfitzseb advice) watch the same file as VSCode does. Pluto has a temp file and comminicates with the VSCode extension for updates. BetterFileWatching is not enabled for this, on the VSCode -> Pluto side, we send an update command and run update_from_file via STDIN and for the Pluto -> VSCode side we type pirate 🦜 the save function of Pluto to also send an update command via STDOUT, only if the file (the result of the save_notebook function) changed.

pankgeorg avatar Nov 15 '21 12:11 pankgeorg