vscode-todo-plus
vscode-todo-plus copied to clipboard
Support rendering some context around embedded tasks
Often TODO:'s are written above the code that is ideally in focus of the TODO.
Current embedded view only lists TODO:'s and the code on the same line with the TODO. Such as:
range: currentYear.map(date => daysSinceEpoch(date)), // TODO: fix
But below code:
// TODO: fix
`range: currentYear.map(date => daysSinceEpoch(date)),
Will only return:
// TODO: fix
And miss out on that line.
I propose to add a setting so that embedded view not only shows TODO: but also the line below it as kind of useful metadata. It's very annoying having to go to @file://
of each TODO just to get more information regarding the task. This would partly solve this issue.
Ideally have this be a toggleable setting from command palette or perhaps hotkey so that the view can be easily changed from just TODO: display (current behavior) and TODO: with one line of code below TODO: displayed.
Sounds reasonable, I didn't implement this because 99% of the time I put my comments on the same line, even if it gets really long.
The part about a command for toggling the setting I'm not so sure about, especially because I think there are already general standalone third-party extensions that can be used for that.
The proposed solution will fail if there are just a bunch of todos listed one after the other (i.e. no actual line of code they refer to) 🤔