0

I just installed Neovim v0.9.1 in a Debian 12 Bookworm Server system. I installed it from its homepage(github) using the .tar.gz method (nvim-linux64.tar.gz) I decompressed the archive in /home/user/Apps/Neovim/nvim-linux64/.

But whenever I use nvim I get this error:

E848: Can't open file /__w/neovim/neovim/build/nvim.AppDir/usr/share/nvim/syntax/syntax.nvim

And when I run :checkhealth command I get this error:

E5009: Invalid $VIMRUNTIME: __w/neovim/neovim/build/nvim.AppDir/usr/share/nvim

How can I solve this error?

I have found syntax.vim is located in /home/user/Apps/Neovim/nvim-linux64/share/nvim/runtime/syntax/ just where I installed NeoVim, but NeoVim is looking for it in another path. I tried copying syntax.vim to usr/share/nvim/syntax/syntax.vim but the errors still remains.

I tried setting the VIMRUNTIME with no success.

1

2 Answers 2

0

As suggested by @ChristianBrabandt you can add the following line at the start of your ~/.config/nvim/init.vim:

let $VIMRUNTIME='/home/user/Apps/Neovim/nvim-linux64/share/nvim'
0

I could fix this problem by linking the executable inside /home/user/Apps/Neovim/nvim-linux64/ with a symbolic link. Using hard links didn't work. If I called the program from inside /home/user/Apps/Neovim/nvim-linux64/ neovim worked without errors, but after creating a symbolic link pointing to /usr/bin I can use nvim from anywhere without a problem (E848: Can't open file /__w/neovim/neovim/build/nvim.AppDir/usr/share/nvim/syntax/syntax.nvim)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.