zed
zed copied to clipboard
add ability to show errors inline like VS Code(error lens)
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 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 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 ))
Agree. This is key feature still keeping me on JetBrains (with Inspection Lens plugin).
For context, error lens looks like this, with red/orange line and text:
Hi, any updates on this?
any update also here?
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. 🚀
Any updates on this? This is really keeping from switching to Zed.
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
bump :(
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. :)
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:
-
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.
-
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.
Still want this feature, whether as an extension or building setting to opt in
+1
I would prefer if this setting was built-in into the editor with the ability to toggle it on/off.
this is a feature I miss a lot, hopefully it will be here before end of this year 🤞🏻
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.
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
~~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.
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.
lmfaooooo
Voicing my request for this feature as well - it's the one thing that would tip me over to using Zed :)
This would be great to have.
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.