Vscode: Show current error in status bar

Created on 8 Feb 2017  路  18Comments  路  Source: microsoft/vscode

  • VSCode Version: 1.9.0
  • OS Version: all

From: https://github.com/Microsoft/vscode-eslint/issues/199

The eslint plugin on vim have a nice feature that if your cursor is on the line of a eslint error it shows the error on status bar, this plugin can do this too?

error-list feature-request on-testplan ux

Most helpful comment

All 18 comments

This feature should support any type of linter/language, not only eslint. Instead of hovering the mouse cursor over highlighted text a user should be able to see the error when placing the caret on the highlighted part.

WebStorm does this, and it's a big timesave for keyboard users. No need to mouse over the error - just see it in the status bar.

This would be great feature. Love this when I'm using Vim.

@dbaeumer Can the extension can do it already?

@sandy081 I don't think that extension should start doing this. If we think this is a useful feature then this should be in the core to ensure it works as expected and can be turned off.

But why in status bar instead in editor?

I think this is because of other editors / IDEs showing it there.

What I am trying to understand is why does users want to see in the status bar and what is it trying to achieve in addition to other editors doing the same.

Because developers who have primarily keyboard driven workflows, such as Vim shortcuts, want to be able to see errors without having to move their hand to use the mouse to hover over them in the editor.

But we also show inline representation of an error when you type f8 key. So if you want to see the error at the given position does the inline view helps? This can show the error completely (including multiple lines and related information) but the status bar has limitations in space right?

image

That still requires an extra action/keypress to view the error. Having used Vim and knowing other Vim users, it is valuable to be able to see errors in the status area while motioning through code.

What I am saying is that status bar has space issues and as a platform it might not be nice to show only partial information and it also flood status bar. If this is an experience of VIM, why not add this functionality to our VIM extension?

But it's not just a VIM thing. All modern IDEs have this feature. Sublime Text does.

I see. I am just thinking to have a nicer way to fulfil this requirement given that there is a space constraint in status bar and we have multiple UIs for errors (Inline, Hover & Panel).

I have come across a requirement for problems panel to show the problems for the given file or for given position only - https://github.com/Microsoft/vscode/issues/30038

Just wanna check either status bar or problems view is the right thing to have this feature. I kinda incline towards problems view as it is better in terms of space and showing information.

What do you think?

@usernamehw thanks! Works like a charm; very useful when using vscodevim.

This will be supported behind the setting problems.showCurrentInStatus. Set it to true to enable.

Kapture 2019-11-08 at 13 44 37

Given the discussion of "status bar real-estate" above, I just thought I'd point out the extension "Error Lens," which displays all errors and warnings inline with the code:

Screen Shot 2019-11-14 at 2 46 22 PM

Just another approach, and, in my experience, incredibly useful since you don't need to move your gaze.

Was this page helpful?
0 / 5 - 0 ratings