-
Notifications
You must be signed in to change notification settings - Fork 37.4k
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).