extensions icon indicating copy to clipboard operation
extensions copied to clipboard

TODO/FIXME highlighting

Open TENX-S opened this issue 1 year ago • 10 comments

Check for existing issues

  • [X] 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

TENX-S avatar Jan 07 '23 11:01 TENX-S

Personally believe this should be left to a Plugin

TerminalFi avatar Jan 07 '23 12:01 TerminalFi

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>

SomeoneToIgnore avatar Jan 26 '23 08:01 SomeoneToIgnore

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

tmaxmax avatar May 31 '23 22:05 tmaxmax

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

berkus avatar Jan 30 '24 22:01 berkus

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

krstp avatar Feb 03 '24 23:02 krstp

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

image

srihariash999 avatar Feb 28 '24 17:02 srihariash999

My experiment, it worked:

image

d1y avatar Mar 07 '24 21:03 d1y

This is not merged yet, correct?

krstp avatar Mar 08 '24 19:03 krstp

My experiment, it worked:

image

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

JosephTLyons avatar Mar 08 '24 19:03 JosephTLyons

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

d1y avatar Mar 08 '24 19:03 d1y