Got `Error executing vim.schedule lua callback: attempt to index field 'semanticTokensProvider' (a nil value)` when open project
bhuynhdev opened this issue · comments
I am using NvChad with ProjectMgr.nvim. I added these lines onto my custom/plugins.lua
.
{
"charludo/projectmgr.nvim",
lazy = false, -- important!
},
Then I run :ProjectMgr
and to add new project. However, whenever I open my Typescript project through ProjectMgr, I always get this error upon entering and exiting Insert mode: Error executing vim.schedule lua callback, attempt to index field 'semanticTokensProvider'
My NvChad works fine when executing directly from the command line nvim <path>
, but not when using :ProjectMgr
. Would anyone know what are some potential causes of this error message?
Somehow this error goes away if I use :ProjectMgr
again to switch to another project, then go back to the Typescript project --> No more errors
Somehow this error goes away if I use
:ProjectMgr
again to switch to another project, then go back to the Typescript project --> No more errors
So this only happens at nvim start-up?
Could you try configuring projectmgr to be loaded after/before any relevant LSP plug-ins?
In any case, looks to me like this is most likely an upstream issue: neovim/neovim#21588
See also the linked issue in nvim-lspconfig at the bottom of that thread.
I see. I used the on_init
tips provided in neovim/nvim-lspconfig#2542 and the problem is resolved. I suppose this is more of an NvChad issue, as I had to change the plugins/configs/lspconfig.lua
in NvChad
I see. I used the
on_init
tips provided in neovim/nvim-lspconfig#2542 and the problem is resolved. I suppose this is more of an NvChad issue, as I had to change theplugins/configs/lspconfig.lua
in NvChad
Nice, glad to hear you could resolve it! In case you haven't already, opening an issue with NvChad could be helpful for others as well.