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

Moving code does not move annotation #35

Open capricorncyber opened 2 years ago

capricorncyber commented 2 years ago

Quite useful extension.

However, if I move the code (for example, add new lines before the annotated code), annotation is attached to the old code position, not the new one.

thamara commented 2 years ago

Thank you for reporting this! This issue is a bit more complex than one might think. We need to figure it out how to track these changes.

dokmanc commented 8 months ago

LineNotePlus (https://github.com/prmichaelsen/linenoteplus) had a good approach of using code comments that link to markdown notes. It was an improvement of LineNote (https://github.com/tkrkt/linenote) which, like your extension, presumably relied on line number to associate a note with a particular line of code. LineNotePlus used comments in the source as a link to the note file. This would've been great but I don't think he ever tested it on Windows as it has significant issues. There is also SideNotes (https://github.com/cyberbiont/vscode-sidenotes/issues) which took the same approach as LinenotePlus. I'd love to find a tool like LineNotePlus that actually worked.