LSP: The `next_result`/`prev_result` hooks don't jump to the next/prev diagnostic if there are build results
Describe the bug
The next_result/prev_result hooks don’t jump to the next/prev diagnostic if there are build results
To Reproduce Steps to reproduce the behaviour:
- Initiate a build
- Introduce an LSP error in some file
- Press
f4(the defaultnext_resultshortcut) - Observe nothing happens
Expected behaviour The error should be highlighted
Environment (please complete the following information):
- OS: macOs 0.15.7
- Sublime Text version: 4107
- LSP version: 1.4.0
- Language servers used: ruby(solargraph, sorbet)
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 24 (22 by maintainers)
Commits related to this issue
- Document fix for F4 not working (sublimelsp/LSP#1721). — committed to htmue/LSP by htmue 3 years ago
- Document fix for F4 not working (sublimelsp/LSP#1721). — committed to sublimelsp/LSP by htmue 3 years ago
You could still use the same key binding if you add a context, for example
would allow to navigate LSP diagnostics whenever no panel is open.
Note that as a performance optimization, the LSP diagnostics panel updates lazily now, i.e. it only will be updated if it is visible, or when it gets opened. This means that
next_result/prev_resultwon’t work reliably anymore, unless the panel is open. But you can/should add key bindings forlsp_next_diagnostic/lsp_prev_diagnosticinstead, which work with closed panel, will only jump to diagnostics in the current tab (the other commands would open other files if the server reports diagnostics for those too), and they wrap around when the last/first diagnostic is reached.