microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.27k stars 29.31k forks source link

Add a specific panel for TODO-style comments #162455

Open DanTup opened 2 years ago

DanTup commented 2 years ago

Other editors have a panel for TODO comments to keep them out of the normal Problems view. VS Code doesn't, so some languages (including Dart) are providing them as Diagnostics.

Some users use generic TODO extensions that search across text. These might not be as accurate as those provided by a language server because they don't understand the syntax (they're also duplicating work by reading every file searching for TODOs).

Because language extensions can't rely on users having TODO extensions, they might still produce diagnostics, giving the users duplicates (in their TODO extension and in Problems).

It seems like the best solution would be for VS Code to have some native concept for TODOs. This could be new, or it could simple be a new Diagnostic type, which can be filtered out of Problems and shown in another window (this reduces the need for new APIs, adding only a new diagnostic kind).

Having a seperate pane would also allow for seperate search/filters. For example in many repositories it's common to use TODO(myname): as a prefix. Being able to filter to myname in a TODO pane (to avoid seeing other users TODOs) without also hiding all the errors/warnings would be very useful.

timsneath commented 2 years ago

Just adding support here. TODO items are similar to Github Issues: they're a representation of a backlog. Problems/Errors/Warnings aren't a backlog: they're immediate feedback on the current task at hand. If there's anything in the problems window, I really should fix that before I can proceed. It would be nice to keep these two separate.

cliftonlabrum commented 2 years ago

One of the more popular extensions for this is Todo Tree: https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree

I agree that making it a native feature is a good idea.

alexdima commented 2 years ago

fyi @jrieken @dbaeumer

vscodenpa commented 2 years ago

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

vscodenpa commented 2 years ago

:slightly_smiling_face: This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

mavriq-dev commented 8 months ago

FYI, for anyone facing the issue, if you want to work around this until(if) it is implemented simply add !TODO in the filter for Problems:

image

This doesn't fix the diagnostic issue, but at least gets them out of the way when looking directly at the problems list.

MJ12358 commented 6 months ago

Came here from https://dartcode.org/upstream-issues. This would be a fantastic addition to VS Code.