Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on :ToggleDiagOff #10

Open
ol-imorozko opened this issue Apr 2, 2023 · 3 comments
Open

Error on :ToggleDiagOff #10

ol-imorozko opened this issue Apr 2, 2023 · 3 comments

Comments

@ol-imorozko
Copy link

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
@pedrohdz
Copy link

Pinning to commit a7839742dadf90177f3a9ea4747e79f404d10af3 was my workaround.

@WhoIsSethDaniel
Copy link
Owner

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:

  1. open a file that will show diagnostics
  2. :ToggleDiagOff
  3. I observe the diagnostics are turned off

I do not see any errors.

@aleksmark98
Copy link

I had the same issue as @ol-imorozko, when I installed with packer and forgot to add the init() function call to my config.

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

No branches or pull requests

4 participants