Skip to content
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

TODO/FIXME highlighting #523

Open
1 task done
TENX-S opened this issue Jan 7, 2023 · 20 comments
Open
1 task done

TODO/FIXME highlighting #523

TENX-S opened this issue Jan 7, 2023 · 20 comments
Labels
needs infrastructure Zed's extension infrastructure doesn't currently support this type of extension theme A request to add a theme extension

Comments

@TENX-S
Copy link

TENX-S commented Jan 7, 2023

Check for existing issues

  • Completed

I think it's a common and useful feature, since the mainstream editors (IDEA, VS Code) all support it.

If applicable, add mockups / screenshots to help present your vision of the feature

image

@TerminalFi
Copy link

Personally believe this should be left to a Plugin

@JosephTLyons JosephTLyons added the theme A request to add a theme extension label Jan 9, 2023
@SomeoneToIgnore
Copy link

Instead of a plugin, is there a way to allow configuring certain matches being colored differently?

I browse logs in editor, and it helps a lot to highlight ERROR and similar lines in red, WARN and similar in yellow, etc.
VSCode provides a Logfile color scheme, but Sublime does not.

Instead, Sublime allows you to add a few directives how to color certain files, example I use for the log files:

 ❯ cat sublime/Logfile.tmLanguage
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>fileTypes</key>
    <array>
        <string>log</string>
    </array>
    <key>name</key>
    <string>Logfile</string>
    <key>patterns</key>
    <array>
        <dict>
            <key>match</key>
            <string>^.*(ERROR|Error|error).*$</string>
            <key>name</key>
            <string>entity.name.tag.log</string>
        </dict>
        <dict>
            <key>match</key>
            <string>^.*(WARN|Warn|warn).*$</string>
            <key>name</key>
            <string>variable.parameter.log</string>
        </dict>
        <dict>
            <key>match</key>
            <string>^.*(DEBUG|Debug|debug).*$</string>
            <key>name</key>
            <string>constant.numeric.log</string>
        </dict>
        <dict>
            <key>match</key>
            <string>^.*(INFO|Info|info).*$</string>
            <key>name</key>
            <string>comment.log</string>
        </dict>
    </array>
    <key>scopeName</key>
    <string>source.log</string>
    <key>uuid</key>
    <string>8728e0fe-14c6-4374-acde-da1857d0a378</string>
</dict>
</plist>

@tmaxmax
Copy link

tmaxmax commented May 31, 2023

It would be cool if this would also highlight things like Rust's todo! macro.

@JosephTLyons JosephTLyons transferred this issue from zed-industries/community Jan 24, 2024
@berkus
Copy link

berkus commented Jan 30, 2024

Would be nice to have a plugin like VSCode's TODO Highlight v2, which is extremely configurable.

@krstp
Copy link

krstp commented Feb 3, 2024

FYI: I put the comment on zed-industries/zed#6013, but dos not seem this feature is implemented in latest releases.

@JosephTLyons JosephTLyons transferred this issue from zed-industries/zed Feb 15, 2024
@JosephTLyons JosephTLyons transferred this issue from zed-industries/extensions Feb 16, 2024
@srihariash999
Copy link

Highlighting comments as warnings and important notes might also be useful.

image

@d1y
Copy link
Contributor

d1y commented Mar 7, 2024

My experiment, it worked:

image

@krstp
Copy link

krstp commented Mar 8, 2024

This is not merged yet, correct?

@JosephTLyons
Copy link
Collaborator

My experiment, it worked:

image

Curious - did you directly bake this into Zed, or is this an extension?

@d1y
Copy link
Contributor

d1y commented Mar 8, 2024

My experiment, it worked:
image

Curious - did you directly bake this into Zed, or is this an extension?

In the zed source code, see zed-industries/zed#9082

@JosephTLyons JosephTLyons added the needs infrastructure Zed's extension infrastructure doesn't currently support this type of extension label Apr 12, 2024
@JosephTLyons JosephTLyons transferred this issue from zed-industries/zed Apr 12, 2024
@prabh8331
Copy link

Hello, Today I have downloaded on linux, I was a VS code user and i am trying to find better alternative, in vs code there was one extension which i used a lot called TODO tree, where my all todo, fixme, bug are shown in single place, is there anything similer to that here?

@kohltastrophe
Copy link

Just checking in to see if there's been any progress or updates on extension capabilities that might support this feature? This is one of the few remaining features impacting my decision to fully adopt Zed, and I'm really eager to see it implemented.

Any insights or timelines from the extension team would be greatly appreciated by those of us who have been patiently waiting for this issue to be resolved. If there are ways we could contribute or assist in bringing this feature to fruition, please let us know.

@FrancoLab
Copy link

This would be awesome. Switched to Zed from NVim and would love this feature / extension

@TheKamboy
Copy link

this would be a nice feature to have

@dogezen
Copy link

dogezen commented Oct 30, 2024

would like this as well

@aretrace
Copy link

aretrace commented Nov 1, 2024

I completely understand the initial notion that this seems to be better implemented as a plugin, BUT I do think a integrated comment tag system (with configurable and sensible defaults) would really set zed apart (e.g., using TODO tree in VS Code is supper convenient). Think of it as a nice addition of the 'Standard Library' of zed.

@krstp
Copy link

krstp commented Nov 3, 2024

Well.. one thing should be mentioned I do not think it is exactly possible to get it as a plugin. I did try to dab at it, but no success.

TBH, whatever I was trying to do was related to line wrapping, which I think would have the implementation logic somewhat similar.

I was able to create a dummy extension template and install it, but any further changes always took me to the editor level modification, which I need to admit was a notch beyond my comprehension. To be more precise, I do not think plugins level let you access editor level crate for mods 🤔

Checking further the documentation on extensions, I think they are limited to: themes, languages, slash commands (https://zed.dev/docs/extensions/developing-extensions).

Maybe I am misinterpreting something, but AFAIK the modification will need to happen in the base code.

P.S.: If there is a way to do it at the plugin level, I would be happy to get some guidance from the devs and do it.

BTW: I did try to use zed-chat, seeking guidance, but I did not get any answers... :(

@Cluster444
Copy link

This should absolutely be in the core zed product. Sorry, but saying this is best as a plugin is not understanding the product you're even building.

I don't want to have to install dozens of dependencies to get basic programming features I use every day.

@kamerado
Copy link

This should absolutely be in the core zed product. Sorry, but saying this is best as a plugin is not understanding the product you're even building.

I don't want to have to install dozens of dependencies to get basic programming features I use every day.

I absolutely agree. at this point it makes more sense to just use neovim if you want customization

@Moshyfawn
Copy link
Member

You're forgetting the fact that extensions can be shipped with the editor by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs infrastructure Zed's extension infrastructure doesn't currently support this type of extension theme A request to add a theme extension
Projects
None yet
Development

No branches or pull requests