toggle-lsp-diagnostics.nvim
toggle-lsp-diagnostics.nvim copied to clipboard
Error on :ToggleDiagOff
E5108: Error executing lua ...ggle-lsp-diagnostics.nvim/lua/toggle_lsp_diagnostics.lua:44: attempt to index a nil value
stack traceback:
...ggle-lsp-diagnostics.nvim/lua/toggle_lsp_diagnostics.lua:44: in function 'current_settings'
...ggle-lsp-diagnostics.nvim/lua/toggle_lsp_diagnostics.lua:133: in function 'configure_diagnostics'
...ggle-lsp-diagnostics.nvim/lua/toggle_lsp_diagnostics.lua:57: in function 'turn_off_diagnostics'
[string ":lua"]:1: in main chunk
nvim --version shows
NVIM v0.9.0-dev-1291+gbad218cd6
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-10 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -fno-common -Wno-unused-result -Wimplicit-fallthrough -fdiagnostics-color=always -fstack-protector-strong -DUNIT_TESTING -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -I/__w/neovim/neovim/.deps/usr/include/luajit-2.1 -I/usr/include -I/__w/neovim/neovim/.deps/usr/include -I/__w/neovim/neovim/build/src/nvim/auto -I/__w/neovim/neovim/build/include -I/__w/neovim/neovim/build/cmake.config -I/__w/neovim/neovim/src -I/usr/include -I/__w/neovim/neovim/.deps/usr/include -I/__w/neovim/neovim/.deps/usr/include -I/__w/neovim/neovim/.deps/usr/include -I/__w/neovim/neovim/.deps/usr/include -I/__w/neovim/neovim/.deps/usr/include -I/__w/neovim/neovim/.deps/usr/include
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/__w/neovim/neovim/build/nvim.AppDir/usr/share/nvim"
Run :checkhealth for more info
Pinning to commit a7839742dadf90177f3a9ea4747e79f404d10af3
was my workaround.
Apologies for being so late to this. Real life got in the way.
Can you share more information about your setup? I cannot replicate this with nvim 0.9.0, 0.9,1, or 0.10.0.
What I am doing:
- open a file that will show diagnostics
- :ToggleDiagOff
- I observe the diagnostics are turned off
I do not see any errors.
I had the same issue as @ol-imorozko, when I installed with packer and forgot to add the init() function call to my config.