Repository navigation
Description
Requested Feature
From my current cursor position, I will like to jump to the problem with the closest diagnostic start position (ie the next/previous underlined word, no matter the color).
Issue Description
Consider the following python snippet:
import math
impor math # warning, error
import mat # warning
print('hello' # error
At time of writing, pylance (from the python extension) reports 4 alternating error/warning problems with the above snippet. When cycling through the problems from line 1 (via editor.action.marker.next), the cursor jumps to lines in the order 2(error)->4(error)->2(warning)->3(warning).
While this may be the expected behaviour (as indicated by the command title Go to Next Problem (Error, Warning, Info)), I found this non-line-sequential behaviour to be fairly confusing as I expected my cursor to simply jump to the next underlined word.
Additionally, diagnostic severity levels are reevaluated every time we exit a chain of continuous jumps (eg. via ESC). For example, if we go from 2(error)->4(error)->2(warning)->ESC, rerunning the command causes the cursor to jump to 2(error) again.
It will be nice if we can implement a similar command which jumps to the next problem ordered by diagnostic start positions. In the above example, the expected behaviour for a cursor cycling through problems from line 1 would be 2(warning)->2(error)->3(warning)->4(error).
Activity
vscode-triage-bot commentedon Oct 20, 2021
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!
pohzipohzi commentedon Oct 25, 2021
Johannes Rieken (@jrieken) in hindsight this seems more like a bug than a feature request. I made a PR that "fixes" this behaviour - what do you think?
jrieken commentedon Nov 29, 2021
To verify make sure there this setting and that it works:
problems.compareOrderrchiodo commentedon Dec 1, 2021
/verified
align with other settings and rename `problems.compareOrder` to `prob…
jrieken commentedon Dec 2, 2021
fyi - renamed this setting to
problems.sortOrderto align with other settingsvscode: align with other settings and rename `problems.compareOrder` …