I’ve been trying to use Neovim as my IDE, with the AstroNvim configuration.
Switching from Emacs key bindings has been a small challenge, but I’m getting the hang of it after only a week.
I did try a few days ago to add the java pack from the astrocommunity.
I wasn’t able to figure out how to configure it, so backed it out.
I’m not needing to do any Java work for a while, it was only a curiosity.
Problem
Unfortunately, every time I start up nvim and opena file, I get this error appearing in a popup:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
Error executing vim.schedule lua callback: ...m-dap.nvim/lua/mason-nvim-dap/mappings/adapters/init.lua:7: module 'mason-nvim-dap.mappings.adapters.js' not found
no field package.preload['mason-nvim-dap.mappings.adapters.js']
cache_loader: module mason-nvim-dap.mappings.adapters.js not found
cache_loader_lib: module mason-nvim-dap.mappings.adapters.js not found
no file './mason-nvim-dap/mappings/adapters/js.lua'
no file '/home/runner/work/neovim/neovim/.deps/usr/share/luajit-2.1.0-beta3/mason-nvim-dap/mappings/adapters/js.lua'
no file '/usr/local/share/lua/5.1/mason-nvim-dap/mappings/adapters/js.lua'
no file '/usr/local/share/lua/5.1/mason-nvim-dap/mappings/adapters/js/init.lua'
no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/mason-nvim-dap/mappings/adapters/js.lua'
no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/mason-nvim-dap/mappings/adapters/js/init.lua'
no file './mason-nvim-dap/mappings/adapters/js.so'
no file '/usr/local/lib/lua/5.1/mason-nvim-dap/mappings/adapters/js.so'
no file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/mason-nvim-dap/mappings/adapters/js.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file './mason-nvim-dap.so'
no file '/usr/local/lib/lua/5.1/mason-nvim-dap.so'
no file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/mason-nvim-dap.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
...m-dap.nvim/lua/mason-nvim-dap/mappings/adapters/init.lua:7: in function '__index'
...vim/lazy/mason-nvim-dap.nvim/lua/mason-nvim-dap/init.lua:49: in function 'fn'
...l/share/nvim/lazy/mason.nvim/lua/mason-core/optional.lua:91: in function 'if_present'
...vim/lazy/mason-nvim-dap.nvim/lua/mason-nvim-dap/init.lua:41: in function 'fn'
...l/share/nvim/lazy/mason.nvim/lua/mason-core/optional.lua:91: in function 'if_present'
...vim/lazy/mason-nvim-dap.nvim/lua/mason-nvim-dap/init.lua:65: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
|
Investigation
I’ve tried the following to verify that my configuration is clean:
1
2
|
cd ~/.config/nvim/
git status
|
1
2
|
HEAD detached at v3.12.1
nothing to commit, working tree clean
|
1
2
|
cd ~/.config/nvim/lua/user/
git reset --hard upstream/main
|
So far, no change.
Next step: wipe the ~/.local/state/nvim/
then ~/.local/share/nvim/
directories.
1
|
rm -r ~/.local/state/nvim/
|
Nope.
Solution
1
|
rm -r ~/.local/share/nvim/
|
That appears to have fixed it.
All the plugins were resintalled as soon as I restarted nvim.
I was then able to successfully restore my ~/.config/nvim/lua/user/
configuration without introducing any new problems.