Skip to content

fix: replaced deprecated vim.diagnostic.disable()#1445

Closed
EliTyson wants to merge 2 commits into
L3MON4D3:masterfrom
EliTyson:deprecation_fix
Closed

fix: replaced deprecated vim.diagnostic.disable()#1445
EliTyson wants to merge 2 commits into
L3MON4D3:masterfrom
EliTyson:deprecation_fix

Conversation

@EliTyson

Copy link
Copy Markdown

Replace Deprecated vim.diagnostic.disable()

vim.diagnostic.disable() was deprecated in Neovim 0.10
https://neovim.io/doc/user/deprecated/#vim.diagnostic.disable()

This causes an error when using the "Snippet List" feature: require("luasnip.extras.snippet_list").open().

Replacing vim.diagnostic.disable() with vim.diagnostic.enable(false) resolves the problem.

@EliTyson

Copy link
Copy Markdown
Author

Is a version checking necessary here?

if vim.fn.has("nvim-0.10") == 1 then
	vim.diagnostic.enable(false, { bufnr = buf })
else
	vim.diagnostic.disable(buf)
end

@EliTyson EliTyson closed this Jun 21, 2026
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.

1 participant