ray-x / navigator.lua

Code analysis & navigation plugin for Neovim. Navigate codes like a breeze🎐 Exploring LSP and 🌲Treesitter symbols a piece of 🍰 Take control like a boss 🦍
MIT License
1.31k stars 58 forks source link

"filename: expected string, got nil" When Starting Lsp #103

Closed JuniorSuperTux closed 2 years ago

JuniorSuperTux commented 2 years ago

Get this error shown when trying to open file

Error executing vim.schedule lua callback: ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:350: Vim(lua):E5108: Error executing lua /home/supertux/.local/share/nvim/runtime/lua/vim
/lsp.lua:97: filename: expected string, got nil
stack traceback:
        /home/supertux/.local/share/nvim/runtime/lua/vim/lsp.lua:97: in function 't'
        vim/shared.lua:541: in function 'is_valid'
        vim/shared.lua:559: in function 'validate'
        /home/supertux/.local/share/nvim/runtime/lua/vim/lsp.lua:220: in function 'validate_client_config'
        /home/supertux/.local/share/nvim/runtime/lua/vim/lsp.lua:644: in function 'start_client'
        ...m/autoload/plugged/nvim-lspconfig/lua/lspconfig/util.lua:287: in function 'add'
        ...utoload/plugged/nvim-lspconfig/lua/lspconfig/configs.lua:218: in function 'try_add'
        [string ":lua"]:1: in main chunk
        [C]: in function 'cmd'
        ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:350: in function 'fn'
        vim.lua:403: in function 'cb'
        vim.lua:277: in function <vim.lua:277>

There are no errors in the navigator log file, though. Here's a part of the log file:

[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:590: loading for ft  cpp file:///home/supertux/test.cpp
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: angularls
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: gopls
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: tsserver
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: flow
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: bashls
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: dockerls
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: julials
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: pylsp
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: pyright
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: jedi_language_server
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: jdtls
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: sumneko_lua
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: vimls
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: html
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: jsonls
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: solargraph
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: cssls
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: yamlls
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: clangd
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:436: clangd {}
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:483: loading clangd name clangd has lspinst false
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:304: cpp clangd {}
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:344: lspconfig setup
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:352: clangd loading for cpp
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: ccls
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:483: loading ccls name ccls has lspinst false
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:304: cpp ccls {}
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:326: lsp not installed for client ccls { "ccls" }
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: sqls
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: denols
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: graphql
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: dartls
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: dotls
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: kotlin_language_server
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: nimls
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: intelephense
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: vuels
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: phpactor
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: omnisharp
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: r_language_server
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: rust_analyzer
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: terraformls
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: svelte
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:408: texlab
[INFO  Wed 24 Nov 2021 08:53:41 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:539: nil
[INFO  Wed 24 Nov 2021 08:53:42 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:539: nil
[INFO  Wed 24 Nov 2021 08:53:44 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:539: nil
[INFO  Wed 24 Nov 2021 08:53:45 PM CST] ...lugged/navigator.lua/lua/navigator/lspclient/clients.lua:539: nil
ray-x commented 2 years ago

validate_client_config failure. that means your clangd setup may be incorrect. Could you post your setup for navigator. Is the issue still exist when you use the default config? It could be a neovim version issue. Which version you are using? Could you update to latest neovim (0.6.x)

JuniorSuperTux commented 2 years ago

Thanks, it worked after updating to the latest neovim. I was using 0.5 then.