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

Linking to jupyter notebook anchors #214

Open
peterchenadded opened this issue Dec 1, 2023 · 0 comments
Open

Linking to jupyter notebook anchors #214

peterchenadded opened this issue Dec 1, 2023 · 0 comments

Comments

@peterchenadded
Copy link

peterchenadded commented Dec 1, 2023

Great extension but noticed anchors in jupyter notebooks do not really work.

Steps to reproduce:

  1. Set an anchor in a jupyter notebook
  2. Set a link to that anchor e.g from a python file

Actual:

When clicking on the link it opens the notebook and shows the top of the notebook.

Expected:

Should also scroll to the anchor which could be in any of the markdown/code editors in the notebook and highlight the anchor.

Purpose:

This would be useful because I have not seem any native vscode functionality or extension that can do this and significantly helps with navigation into notebook code.

Did some googling, and I believe adopting below two resources, with comment anchors existing linking to the file working, should allow it to move to the editor that has the anchor.

Loop through notebook cells code
https://github.com/xelad0m/vscode-jupyter-toc/blob/main/src/extension.ts

Notebook editor reveal range
https://code.visualstudio.com/api/references/vscode-api#NotebookEditor

However, I lack vscode extensions development experience so will take me quite long to implement.

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

No branches or pull requests

1 participant