zed icon indicating copy to clipboard operation
zed copied to clipboard

add ability to show errors inline like VS Code(error lens)

Open victororlyk opened this issue 1 year ago • 17 comments

Check for existing issues

  • [X] Completed

Describe the feature

It would be really nice to have ability to see the error inline without need to hover or go with cursor to that place. I really love this extension, but I think it would be nice to have in the code of editor

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

No response

victororlyk avatar Mar 19 '23 18:03 victororlyk

@victororlyk is not precisely the same as the error lens plugin, but have you already tried pressing f8 (and/or shift+f8)? It brings you to the next diagnostic and inlines the error.

fdionisi avatar Mar 19 '23 18:03 fdionisi

@fdionisi yeah i have, those are cool, but I don't use f keys a lot. I have keyboard with f row and it is a bit annoying to use fs i use them only when it is really needed) https://happyhackingkb.com/. So a for me i just use vim keybinding to jump to the error for me it is faster) vim remappings would help ))

victororlyk avatar Mar 19 '23 19:03 victororlyk

Agree. This is key feature still keeping me on JetBrains (with Inspection Lens plugin).

diocletiann avatar May 30 '23 23:05 diocletiann

For context, error lens looks like this, with red/orange line and text: image

probablykasper avatar Jun 18 '23 23:06 probablykasper

Hi, any updates on this?

dumski avatar Mar 25 '24 11:03 dumski

any update also here?

barel-mishal avatar Apr 01 '24 11:04 barel-mishal

Hello, thank you for all the great work you have done, it is a great editor, I just need this functionality to move from vscode to zed. 🚀

bernabedev avatar Apr 18 '24 16:04 bernabedev

Any updates on this? This is really keeping from switching to Zed.

panosdigital avatar May 28 '24 00:05 panosdigital

any update on this?

i would really love this, it is a great experience to see errors in the same line, and don't need to hover my mouse over the error

KMJ-007 avatar Jun 06 '24 07:06 KMJ-007

bump :(

caner-cetin avatar Jun 11 '24 12:06 caner-cetin

Hey there! I haven't touched Zed's extension system yet. However, if it's possible, I'd love to give implementing this a try!

If you're aware of whether this could be implemented through an extension, please let me know. :)

onkoe avatar Jun 27 '24 04:06 onkoe

Hey there! I haven't touched Zed's extension system yet. However, if it's possible, I'd love to give implementing this a try!

If you're aware of whether this could be implemented through an extension, please let me know. :)

I had a look at this issue but ended up just implementing some fixes around the already built-in diagnostics that you can navigate through. From that experience, I'd personally see that it would make sense to implement this as a built-in option (i.e. no extension), with implementation steps being the following:

  1. Refactoring of the current diagnostic system to support having multiple diagnostics open at the same time: currently only one can be visible at once. A thing to keep in mind with this is the fact that one line can have multiple errors with different (or same) severities, e.g. Typescript + ESLint can easily cause multiple errors per line.

  2. The displaying part: should only one be visible per line, if so, which one? How would the navigation behave w.r.t. this, as that should preferable always go through all diagnostics, instead of only the ones visible.

NOTE: I'm not affiliated with Zed, but would like to see this feature implemented, so shared my thoughts regarding the implementation.

kahlstrm avatar Jun 27 '24 16:06 kahlstrm

Still want this feature, whether as an extension or building setting to opt in

ActuallyHappening avatar Jul 06 '24 04:07 ActuallyHappening

+1

mikestonecodes avatar Jul 10 '24 20:07 mikestonecodes

I would prefer if this setting was built-in into the editor with the ability to toggle it on/off.

ArbazSparkoSol avatar Jul 18 '24 05:07 ArbazSparkoSol

this is a feature I miss a lot, hopefully it will be here before end of this year 🤞🏻

utkutekalmaz avatar Aug 15 '24 21:08 utkutekalmaz

If you've never used Error Lens, it's really surprising what a difference it makes to your workflow. You might think "What's the big deal? I can always hover the mouse over the squiggly line and see the error, or press F8 to go to 'next problem'." But that's an action I have to take, and I've noticed my students quite happily ignoring the squiggly line indicators, trying to run the program, and then being surprised that it doesn't compile.

As soon as I tell them to turn on Error Lens (in VS Code), that issue disappears, because every error and warning is shown right IN THEIR FACES, unavoidably, unignorably. It's like seeing the teacher's red pen all over your code. And it helps me too, because eliminating that one extra step makes a big difference.

Writing Rust, you see errors and warnings all the time: it's like a constant, ongoing dialogue between you and the compiler. The Error Lens facility just removes the friction from that loop: type something, see the error, fix the mistake. Since it's something that all language-server-supported scopes can benefit from, this feature seems well worth it.

bitfield avatar Aug 25 '24 12:08 bitfield

Completely agree with @bitfield, it really is one of those where it is really hard to go back once you got used to having it so immediate

axelinternet avatar Aug 26 '24 17:08 axelinternet

~~BTW you can press F8 to go to the next diagnostic and it shows the error like error-lens would.~~

You can also press ctrl-k ctrl-i to show error message at the cursor position. I like to rebind it to ctrl-shift-/ so it's easier to input.

phaux avatar Aug 27 '24 12:08 phaux

You might think "What's the big deal? I can always hover the mouse over the squiggly line and see the error, or press F8 to go to 'next problem'."

Told you someone would think that.

bitfield avatar Aug 28 '24 11:08 bitfield

lmfaooooo

caner-cetin avatar Aug 28 '24 11:08 caner-cetin

Voicing my request for this feature as well - it's the one thing that would tip me over to using Zed :)

contreau avatar Aug 28 '24 20:08 contreau

This would be great to have.

kuglee avatar Aug 31 '24 17:08 kuglee

For anyone that has a dev build of zed running, I've just submitted a PR that attempts to implement this in #17269. I'd appreciate any feedback as I've got no idea how folks test GUI apps like this.

davisp avatar Sep 02 '24 15:09 davisp