Skip to content

fix: deprecated diagnostic jumping config#1982

Open
nathanzeng wants to merge 1 commit intonvim-lua:masterfrom
nathanzeng:jump-diagnostic
Open

fix: deprecated diagnostic jumping config#1982
nathanzeng wants to merge 1 commit intonvim-lua:masterfrom
nathanzeng:jump-diagnostic

Conversation

@nathanzeng
Copy link
Copy Markdown
Contributor

@nathanzeng nathanzeng commented Apr 6, 2026

opts.jump.float is deprecated as of the 0.12 release. To confirm, use the kickstart config and run:
:checkhealth vim.deprecated

  • ⚠️ WARNING opts.jump.float is deprecated. Feature will be removed in Nvim 0.14
    • ADVICE:
      • use opts.jump.on_jump instead.

This also bumps the minimum version to 0.12

Comment on lines +188 to +191
on_jump = function(diagnostic, _)
if not diagnostic then return end
vim.diagnostic.open_float { focus = false }
end,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Suggested change
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,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@oriori1703
Copy link
Copy Markdown
Collaborator

Because this uses a feature (on_jump) that was added in 0.12 you should also bump the version in lua/kickstart/health.lua.

On a related note, should we wait a bit before dropping support for 0.11?
I know a lot of people get Neovim from their distro’s package manager, and most distros haven’t updated to 0.12 yet.

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
@nathanzeng
Copy link
Copy Markdown
Contributor Author

Thanks for the review, and good catch on bumping the health check. Waiting for Ubuntu and Fedora seems like a good idea to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants