fix: deprecated diagnostic jumping config#1982
fix: deprecated diagnostic jumping config#1982nathanzeng wants to merge 1 commit intonvim-lua:masterfrom
Conversation
| on_jump = function(diagnostic, _) | ||
| if not diagnostic then return end | ||
| vim.diagnostic.open_float { focus = false } | ||
| end, |
There was a problem hiding this comment.
I checked neovim/neovim@dbe17da, which deprecated the option, and it seems like we should do the following if we want to exactly match the previous behaviour:
| on_jump = function(diagnostic, _) | |
| if not diagnostic then return end | |
| vim.diagnostic.open_float { focus = false } | |
| end, | |
| on_jump = function(_, bufnr) | |
| vim.diagnostic.open_float { | |
| bufnr = bufnr, | |
| scope = 'cursor', | |
| focus = false, | |
| } | |
| end, |
There was a problem hiding this comment.
I included if not diagnostic then return end because I saw it in the neovim help :h diagnostic-on-jump-example or see here
I didn't add bufnr or scope because I believe the defaults for those values are the same as what we would pass? Let me know if you want me to add it explicitly though and I'll force push
|
Because this uses a feature ( On a related note, should we wait a bit before dropping support for 0.11? Both Ubuntu and Fedora are releasing new versions this month, and I assume they’ll include 0.12. Should we wait until those releases? (Mostly thinking out loud - though I would love to hear others' opinion) |
- bump checkhealth minimum version to 0.12
2ba0738 to
2194d49
Compare
|
Thanks for the review, and good catch on bumping the health check. Waiting for Ubuntu and Fedora seems like a good idea to me. |
opts.jump.floatis deprecated as of the 0.12 release. To confirm, use the kickstart config and run::checkhealth vim.deprecatedThis also bumps the minimum version to 0.12