Open torkelrogstad opened 4 years ago
100% agree Or if you can focus on the "error provider" of your choice that will be ideal: just next error coming from eslint, next error coming from typescript, etc.
It would be nice if we could define something like this
{
"key": "f4",
"command": "editor.action.marker.next",
"args": "Error|Warn"
}
And it would skip the Info markers
Are there any plans to implement this feature?
I don't think this needs extra configuration. Why can't Next/Previous Problem respect the current filter set in the Problems view? Basically if a problem is filtered out, skip it when doing Next Problem keyboard shortcut.
I don't think this needs extra configuration. Why can't Next/Previous Problem respect the current filter set in the Problems view? Basically if a problem is filtered out, skip it when doing Next Problem keyboard shortcut.
That makes a lot of sense
IMHO, both adding a new command or passing args to the current one are good. I searched the market and there's none. Maybe someone can make an extension for this?
I made a VSCode extension because I've also been having trouble with this. https://marketplace.visualstudio.com/items?itemName=yy0931.go-to-next-error
https://marketplace.visualstudio.com/items?itemName=yy0931.go-to-next-error
I tested this extension by @yy0931 and it's quite good! And very thoughtful to write the full guide. 5 stars! I reckon this issue is ready to be closed for being solved.
It would be much appreciated if it was already a feature of vscode itself
Very sad somebody had to write an extension for this.
In Jetbrains IDEs "Next Error" loops through all errors across all files, and only when there are no longer any errors, loops through all warnings, etc. I quite like this behaviour and it might address or complement the scenario in this issue.
However it doesn't appear possible in VsCode:
My typical scenario: adding a required member to the TS interface of a React component props always causes errors in the parent component files. I'd press {key} to navigate to those right next -- which might over multiple files, possibly with warnings -- so that I can build again, then keep using {key} to navigate to warnings from the current location.
In short I suggest that when when problems.sortOrder = 'Severity':
FYI you can do F8
to jump next/previous error.
Related Stack Overflow question: How do I go to the next error (not next problem) in using a keyboard shortcut?
As this issue mentions a spell checker as an example, and I found this thread while dealing with that same issue: here's another solution. This pertains to Code Spell Checker aka streetsidesoftware.code-spell-checker
. It comes with an option diagnosticLevel
, which is Information
by default, and will subsequently show in the Problems pane and be subject to Go to next error/warning/info commands. The level can be set to Hint
, removing the extension's info from the Problems pane. Go to next error/warning/info then works as expected and doesn't jump to typos anymore.
This is what the Hint level then looks like (bottom left):
So perhaps, as a workaround, see if your extension supports adjusting its reporting level (which doesn't solve the underlying issue of course, a solution to which I'd still prefer over this approach).
Or also having the option of going to the next error avoiding the message and just jumping directly to the error. I use Error Lens and it shows the msg 2 times.
Any solution for that w/o extension/plugins etc?
I'd love a feature where I could go to the next error in the file I'm in, or in the entire project, but not the next warning/info marker. Currently I have these shortcuts available:
editor.action.marker.next
editor.action.marker.nextInFiles
editor.action.marker.prev
editor.action.marker.prevInFiles
I think it'd make a lot of sense to expose similar shortcuts for going to the next error, or the next warning, or the next info, but as separate groups.
Example use case: I have a spell checker and a linter enabled for my project. The linter produces both warnings and errors, and the spell checker produces info markers. I care mostly about linter errors and compiler errors, and when those are fixed I care about spelling errors.