Skip to content
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

feat: register notebook cells with the language client #949

Merged
merged 2 commits into from
Sep 28, 2023

Conversation

nayeemrmn
Copy link
Collaborator

@nayeemrmn nayeemrmn commented Sep 28, 2023

Start sending notebook cells to the LSP.

VSCode stores these cells as documents with URLs like:

vscode-notebook-cell:/home/nayeem/projects/vscode_deno/notebook.ipynb#W0aIKpasdpH53D%3D

When sending them to the LSP, I've mapped them to:

deno-notebook-cell:/home/nayeem/projects/vscode_deno/notebook.ipynb#W0aIKpasdpH53D%3D

because it's neutral to other editors.

@nayeemrmn nayeemrmn requested a review from dsherret September 28, 2023 00:40
Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet! Are we going to be able to tell the order server side?

code2Protocol: (uri) => {
if (uri.scheme == "vscode-notebook-cell") {
const string = uri.with({
scheme: "deno-file-fragment",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@nayeemrmn
Copy link
Collaborator Author

Sweet! Are we going to be able to tell the order server side?

No they're stored as unrelated documents in my current mvp. (But now that I think about it, if we support that I don't think a generic deno-file-fragment scheme makes sense... might have to make it deno-notebook-cell.)

The fragment of the URI seems to contain an index to the cell. Other than that I'm not sure how to decode it properly.

@nayeemrmn nayeemrmn merged commit 603a204 into denoland:main Sep 28, 2023
1 check passed
@nayeemrmn nayeemrmn deleted the notebook-language-service branch September 28, 2023 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants