-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Highlighting of special code comment types like TODO, INFO, etc. #11895
Comments
I'm considering to work on this. Some instructions on how to do it? Colours for example. |
I don't know about the color requirements, but any implementation would probably be a good start. I use this every day in other editors and find it very useful :) |
I readed somewhere that this should be done zed extensions and not in the core codebase. It is still true or we want to consider to implement it in the core? |
@francesco-gaglione did you wind up taking a stab at this? |
@kofron I need first the confirmation from mainteiners to do this into zed core and not in the plugins |
There is this open issue: zed-industries/extensions#523 where the direction was to implement it as an extension. |
My hope is that a straightforward comment tag system could just be integrated into zed itself. |
@francesco-gaglione you can take a stab at implementing this in the core. Why I believe this is useful:
So the work is not wasted anyway. |
@berkus it is a lot of time I don't contribute here... but it is very usefull so I'll take a look.... some hint on where to start? |
No idea, i am not super familiar with zed's internals. I would look through syntax highlighting and editing plumbing - it's probably there at the intersection of those parts. |
I also use keywords = {
FIX = {
icon = " ", -- icon used for the sign, and in search results
color = "error", -- can be a hex color, or a named color (see below)
alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords
-- signs = false, -- configure signs for some keywords individually
},
TODO = { icon = " ", color = "info" },
HACK = { icon = " ", color = "warning" },
WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } },
PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } },
NOTE = { icon = " ", color = "hint", alt = { "INFO" } },
TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } },
} |
@kofron @berkus see #9082 (comment) tl;dr: someone tried to merge a working implementation but got denied, devs want this as an extension and not in core |
Not sure if this would need another issue, but it would also be nice if Zed would have a panel for listing all TODO comments in a project to find them easier. |
This seems to be related #10546 but it's all unified under zed-industries/extensions#523 |
Check for existing issues
Describe the feature
One feature that I find really useful in other editors, e.g., Neovim with the plugin "folke/todo-comments," is the ability to highlight specific types of comments like
// TODO
// INFO
and others. This feature enhances productivity by making it easier to locate and manage important comments within the codebase when scrolling / jumping through the code.Because there may be users who don't want this kind of highlights in the code, it should be configurable by the user (activate / deactivate, configure highlighting color or deriving it from the used theme, etc.)
There is already a feature request (#4808) to introduce a separate tree-structure overview of these comments. However, I think this should also be available in the code itself.
If applicable, add mockups / screenshots to help present your vision of the feature
The text was updated successfully, but these errors were encountered: