-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VSCode-Pluto deep integration #17
Conversation
src/PlutoEditor.ts
Outdated
document.uri, | ||
new vscode.Range(0, 0, document.lineCount, 0), | ||
f) | ||
vscode.workspace.applyEdit(edit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merged from main! (I wrote all these beautiful comments for you but you didn't use them 💔) |
This comment has been minimized.
This comment has been minimized.
src/PlutoEditor.ts
Outdated
private static readonly viewType = 'plutoView'; | ||
private readonly pluto_asset_dir = join(tmpdir(), uuid()) | ||
private readonly webviews = new WebviewCollection(); | ||
private readonly uri_to_notebook_id_map = new Map <vscode.Uri, string>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have uri_to_notebook_id_map
but webviews
also contains this information, since we store the notebook id and uri for each webview. We could remove the uri_to_notebook_id_map
and rewrite that functionality by searching webviews
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now it is unclear if they are added, updated and removed at the same time, or if there are differences between the two.
@pankgeorg i'm merging this! But take a look at the comment above |
Thanks! ❤️
Comments helped a lot! Truth is I went AWOL a bit earlier than I should for my job here to be complete, as you found out it had some serious glitches with opening non-existing notebooks. I'll refactor the URI hashmap, I added it because it helped managing the file renames but it's probably not necessary as you propose. |
TODOs (for this PR):
on_save
hook official instead of the type piracy