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

init.lua:125: attempt to call field 'setup' (a nil value) #2599

Closed
cova-fe opened this issue May 10, 2022 · 5 comments
Closed

init.lua:125: attempt to call field 'setup' (a nil value) #2599

cova-fe opened this issue May 10, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@cova-fe
Copy link

cova-fe commented May 10, 2022

Problem description

When I start lvim I get this error:

Error detected while processing /home/cova/.local/share/lunarvim/lvim/init.lua:
E5113: Error while calling lua chunk: /home/cova/.local/share/lunarvim/lvim/lua/lvim/lsp/init.lua:125: attempt to call field 'setup' (a nil value)
stack traceback:
        /home/cova/.local/share/lunarvim/lvim/lua/lvim/lsp/init.lua:125: in function 'setup'
        /home/cova/.local/share/lunarvim/lvim/init.lua:21: in main chunk

I'm unable to track down where the real issue is.

LunarVim version

commit aa4c993 (Rolling)

Neovim version (>= 0.7)

NVIM v0.7.0 Build type: RelWithDebInfo LuaJIT 2.1.0-beta3

Operating system/version

Gentoo

Relevant log output

go: require("go.health").check()
========================================================================
## binaries
  - info: go installed.
  - info: tool installed: gofumpt
  - info: tool installed: iferr
  - info: tool installed: fixplurals
  - info: tool installed: ginkgo
  - info: tool installed: fillstruct
  - info: tool installed: goimports
  - info: tool installed: fillswitch
  - info: tool installed: golangci-lint
  - info: tool installed: richgo
  - info: tool installed: dlv
  - info: tool installed: gorename
  - info: tool installed: impl
  - info: tool installed: gomodifytags
  - info: tool installed: golines
  - info: tool installed: gopls
  - info: tool installed: gotests
  - ok: all binaries installed
  - info: sed installed.

## go plugin check
  - ok: lspconfig: plugin is installed
  - ok: nvim-treesitter: plugin is installed
  - ok: guihua: plugin is installed
  - warning: nvim-dap-virtual-text: not installed/loaded
  - ok: telescope: plugin is installed
  - ok: nvim-treesitter-go is installed
  - warning: nvim-dap: not installed/loaded
  - warning: nvim-dap-ui: not installed/loaded
  - warning: not all plugin installed

null-ls: require("null-ls.health").check()
========================================================================
  - ok: stylua: the command "stylua" is executable.
  - ok: goimports: the command "goimports" is executable.
  - ok: luacheck: the command "luacheck" is executable.

nvim: health#nvim#check
========================================================================
## configuration
  - ok: no issues found

## performance
  - ok: build type: relwithdebinfo

## remote plugins
  - ok: up to date

## terminal
  - info: key_backspace (kbs) terminfo entry: key_backspace=\177
  - info: key_dc (kdch1) terminfo entry: key_dc=\e[3~
  - info: $colorterm='truecolor'

nvim-lsp-installer: require("nvim-lsp-installer.health").check()
========================================================================
## nvim-lsp-installer report
  - ok: neovim version >= 0.6.0
  - warning: **composer**: not available
  - warning: **php**: not available
  - warning: **julia**: not available
  - ok: **bash**: `gnu bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)`
  - ok: **tar**: `tar (gnu tar) 1.34`
  - ok: **gzip**: `gzip 1.12`
  - ok: **curl**: `curl 7.83.0 (x86_64-pc-linux-gnu) libcurl/7.83.0 (gnutls/3.7.3) openssl/1.1.1o zlib/1.2.12 libidn2/2.3.2 nghttp2/1.47.0 openldap/2.6.1`
  - ok: **wget**: `gnu wget 1.21.3 built on linux-gnu.`
  - ok: **python3**: `python 3.10.4`
  - ok: **node**: `v18.1.0`
  - ok: **ruby**: `ruby 2.6.10p210 (2022-04-12 revision 67958) [x86_64-linux]`
  - ok: **go**: `go version go1.18.1 linux/amd64`
  - ok: **sh**: `ok`
  - ok: **java**: `ok`
  - ok: **rubygem**: `3.3.8`
  - ok: **javac**: `ok`
  - ok: **npm**: `8.8.0`
  - ok: **pip3**: `pip 22.0.4 from /usr/lib/python3.10/site-packages/pip (python 3.10)`

nvim-treesitter: require("nvim-treesitter.health").check()
========================================================================
## installation
  - ok: `tree-sitter` found 0.20.6 (parser generator, only needed for :tsinstallfromgrammar)
  - ok: `node` found v18.1.0 (only needed for :tsinstallfromgrammar)
  - ok: `git` executable found.
  - ok: `cc` executable found. selected from { vim.nil, "cc", "gcc", "clang", "cl", "zig" }
    version: cc (gentoo 11.3.0 p4) 11.3.0
  - ok: neovim was compiled with tree-sitter runtime abi version 14 (required >=13). parsers must be compatible with runtime abi.

## parser/features h l f i j
  - yaml           ✓ ✓ ✓ ✓ ✓ 
  - go             ✓ ✓ ✓ ✓ ✓ 
  - javascript     ✓ ✓ ✓ ✓ ✓ 
  - lua            ✓ ✓ ✓ ✓ ✓ 
  - hcl            ✓ . ✓ ✓ ✓ 
  - tsx            ✓ ✓ ✓ ✓ ✓ 
  - typescript     ✓ ✓ ✓ ✓ ✓ 
  - css            ✓ . ✓ ✓ ✓ 
  - java           ✓ ✓ . ✓ ✓ 
  - bash           ✓ ✓ ✓ . ✓ 
  - python         ✓ ✓ ✓ ✓ ✓ 
  - c              ✓ ✓ ✓ ✓ ✓ 
  - json           ✓ ✓ ✓ ✓ . 
  - rust           ✓ ✓ ✓ ✓ ✓ 

  legend: h[ighlight], l[ocals], f[olds], i[ndents], in[j]ections
         +) multiple parsers found, only one will be used
         x) errors found in the query, try to run :tsupdate {lang}

provider: health#provider#check
========================================================================
## clipboard (optional)
  - ok: clipboard tool found: xclip

## python 3 provider (optional)
  - info: `g:python3_host_prog` is not set.  searching for python3 in the environment.
  - info: executable: /usr/bin/python3
  - info: python version: 3.10.4
  - info: pynvim version: 0.4.3
  - ok: latest pynvim is installed.

## python virtualenv
  - ok: no $virtual_env

## ruby provider (optional)
  - info: ruby: ruby 2.6.10p210 (2022-04-12 revision 67958) [x86_64-linux]
  - info: host: /home/cova/bin/neovim-ruby-host
  - ok: latest "neovim" gem is installed: 0.9.0

## node.js provider (optional)
  - info: node.js: v18.1.0
  - info: nvim node.js host: /home/cova/.config/yarn/global//node_modules/neovim/bin/cli.js
  - ok: latest "neovim" npm/yarn package is installed: 4.10.1

## perl provider (optional)
  - warning: "neovim::ext" cpan module is not installed
    - advice:
      - see :help |provider-perl| for more information.
      - you may disable this provider (and warning) by adding `let g:loaded_perl_provider = 0` to your init.vim

telescope: require("telescope.health").check()
========================================================================
## checking for required plugins
  - ok: plenary installed.
  - ok: nvim-treesitter installed.

## checking external dependencies
  - ok: rg: found ripgrep 13.0.0
  - ok: fd: found fd 8.3.1

## ===== installed extensions =====

## telescope extension: `fzf`
  - info: no healthcheck provided

## telescope extension: `projects`
  - info: no healthcheck provided

vim.lsp: require("vim.lsp.health").check()
========================================================================
  - info: lsp log level : warn
  - info: log path: /home/cova/.cache/nvim/lsp.log
  - info: log size: 22009 kb

vim.treesitter: require("vim.treesitter.health").check()
========================================================================
  - info: runtime abi version : 14
  - ok: loaded parser for bash: abi version 13
  - ok: loaded parser for c: abi version 13
  - ok: loaded parser for css: abi version 13
  - ok: loaded parser for go: abi version 13
  - ok: loaded parser for hcl: abi version 13
  - ok: loaded parser for java: abi version 13
  - ok: loaded parser for javascript: abi version 13
  - ok: loaded parser for json: abi version 13
  - ok: loaded parser for lua: abi version 13
  - ok: loaded parser for python: abi version 13
  - ok: loaded parser for rust: abi version 13
  - ok: loaded parser for tsx: abi version 13
  - ok: loaded parser for typescript: abi version 13
  - ok: loaded parser for yaml: abi version 13

which_key: health#which_key#check
========================================================================
## whichkey: checking conflicting keymaps
  - warning: conflicting keymap exists for mode **"n"**, lhs: **"ys"**
  - info: rhs: `<plug>ysurround`
  - warning: conflicting keymap exists for mode **"n"**, lhs: **"ys"**
  - info: rhs: `<plug>ysurround`
  - warning: buffer-local keymap overriding global for mode **"n"**, buf: 0, lhs: **"<leader>f"**
  - info: old rhs: `<cmd>telescope find_files<cr>`
  - info: new rhs: `<cmd>lua require("which-key").execute(7)<cr>`
  - warning: buffer-local keymap overriding global for mode **"n"**, buf: 0, lhs: **"<leader>st"**
  - info: old rhs: `<cmd>telescope live_grep<cr>`
  - info: new rhs: `<cmd>telescope live_grep<cr>`
  - warning: buffer-local keymap overriding global for mode **"n"**, buf: 0, lhs: **"<leader>sr"**
  - info: old rhs: `<cmd>telescope oldfiles<cr>`
  - info: new rhs: `<cmd>telescope oldfiles<cr>`
  - warning: buffer-local keymap overriding global for mode **"n"**, buf: 0, lhs: **"<leader>lc"**
  - info: old rhs: `<cmd>edit /home/cova/.config/lvim/config.lua <cr>`
  - info: new rhs: `<cmd>edit /home/cova/.config/lvim/config.lua<cr>`

Screenshots

image

@cova-fe cova-fe added the bug Something isn't working label May 10, 2022
@abzcoding
Copy link
Member

that has been added a while back https://github.com/williamboman/nvim-lsp-installer#setup

can you print the output of this command?

git -C ~/.local/share/lunarvim/site/pack/packer/start/nvim-lsp-installer status
git -C ~/.local/share/lunarvim/site/pack/packer/start/nvim-lsp-installer rev-parse HEAD

@cova-fe
Copy link
Author

cova-fe commented May 10, 2022

⌙➤ git -C ~/.local/share/lunarvim/site/pack/packer/start/nvim-lsp-installer status
On branch main
Your branch is behind 'origin/main' by 19 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)

nothing to commit, working tree clean
 ~ 
⌙➤ git -C ~/.local/share/lunarvim/site/pack/packer/start/nvim-lsp-installer rev-parse HEAD
39f84cd24fac6284212909b391df85297019a09e
 ~ 

I understand that I'm a bit behind the upstream head, however I'm pretty sure to have updated both plugins and core-plugins...

@abzcoding
Copy link
Member

that is not supposed to be like that 🤔

"nvim-lsp-installer": {
"commit": "91fe454"
},

ok just do :LvimSyncCorePlugins and if that didn't help
do this

git -C ~/.local/share/lunarvim/site/pack/packer/start/nvim-lsp-installer pull

@cova-fe
Copy link
Author

cova-fe commented May 10, 2022

Ok, thanks, fixed :)
I had to basically remove and recreate my git folder, for some reason it got messed up. Thanks for pointing me in the right direction.
btw, head in nvim-lsp-installer is different from what is described in line 60 of default.json, but it is not really causing issues.
Thanks again

@abzcoding
Copy link
Member

you are welcome
yeah this PR will update that -> #2582

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants