thamara / vscode-code-annotation

Code Annotation Extension for VSCode
https://marketplace.visualstudio.com/items?itemName=tkcandrade.code-annotation
GNU General Public License v3.0
67 stars 27 forks source link

Integration with Jupyter extension #46

Open JeremyMullins opened 10 months ago

JeremyMullins commented 10 months ago

First of all, thank you for such a smart, intelligently designed extension!

I just wanted to ask for some clarification on whether this is an actual issue/bug or just me completely not understanding the use-case/limitations of this extension.

I use Jupyter extensively for the work that I do. It's a fantastic way for me to test out Python code in small individual cells. I do need to keep a ton of notes and that usually means lots and lots of comments that I have to keep track of.

So I install the extension, and everything works just fine in terms of adding the annotation, but I immediately run into a few snags:

I've created a test notebook (notebook extensions are .ipynb) and have screenshots below showing what I'm talking about above (I apologize if I'm not the best with explaining things).

This image gives you an idea of what my workspace looks like when I write code:

image

I've put an annotation on the mkdir(outputfolder) line saying "Make folder if it doesn't exist. As you can see, it doesn't show any highlighting or notification that an annotation exists at that line:

image

As you can see it shows up perfectly fine in the Code Annotation pane:

image

But when I click on the annotation to take me to the location in the script where I placed it, it only takes me to the top of the script (it's hard to see but the cursor is on line 3 of the image below):

image

Now I'm guessing it has something to do with the fact that .ipynb filetypes aren't simply plain text files containing raw code and that this information is stored in what looks to be a fancy JSON, but I'm new to all of this so that's a guess.

Is there a chance that there will be support for Jupyter filetypes?

Thanks again and apologies for the long message.

thamara commented 9 months ago

Hi @JeremyMullins, thanks for reporting this, and for including screenshots and very good descriptions! This helps a lot! The usage os Jupyter is not something I have factored in when developing this extension, but it does sounds like a very nice feature. I agree with you that it probably has something to do with the fact that .ipynb are not plain text files, but I think there should be a way to add/improve the support for these files. I'm going to do some tests here and will update this issue when I have something.

thamara commented 9 months ago

For future reference: https://code.visualstudio.com/api/extension-guides/notebook