Closed tommitah-heeros closed 1 month ago
Switched it to
if vim.fn.has('nvim-0.10') == 1 then
H.diagnostic_is_disabled = function(_) return vim.diagnostic.is_disabled({ bufnr = 0 }) end
Worked, I'll see if I have time to create a PR for this.
Ah, looks like I was running a neovim 0.10 build from an ancient commit, pulling that upstream fixed this for me.
Ah, looks like I was running a neovim 0.10 build from an ancient commit, pulling that upstream fixed this for me.
Yes, vim.diagnostic.is_enabled()
is a (very) late addition to Neovim 0.10, but it is present in released version.
Thanks. I had this issue after an update recently and upgrading neovim helped
Contributing guidelines
Module(s)
mini.statusline
Description
mini.statusline attempts to use the
vim.diagnostic.is_enabled
but it seems like this is a property that doesn't exist onvim.diagnostic
. I'm fairly unfamiliar with the diagnostic api and a quick :h vim.diagnostic didn't produce anything foris_enabled
. Leads me to think this call is just an "inverted" version fromvim.diagnostic.is_disabled
.source: statusline.lua:648
Neovim version
0.10
Steps to reproduce
open file and navigate it
Expected behavior
-
Actual behavior
statusline crashes and produces an error notification: error executing lua .../share/nvim/lazy/mini.statusline/lua/mini/statusline.lua:649 attempt to call field 'is_enabled' (a nil value)