I have made a ton of changes recently to my nvim config, and its mostly migrated to lua. But I noticed recently that my .local/share/nvim/site/keymaps/ are not found. :echo globpath(&rtp, “keymap/*.vim”) is returning only files from /usr/share/nvim/runtime/keymap.
Is that correct ? Or is there something wrong in my config somewhere or do I now need to manually append the .local files to my rtp? I still do have some important lang.vim keymap files that are not migrated to lua.
The common practice is to define your custom config inside
$XDG_CONFIG_HOME/nvim, which defaults to
"$HOME/.config/nvim". Is there any reason why you don’t want to do this? My suggestion would be to migrate your config to
"$HOME/.config/nvim", which means moving your
keymap dir to
EDIT: This is the list of directories that are searched in my neovim:
I noticed that
/home/mroavi/.local/share/nvim/site is indeed included and, therefore, scripts in a dir named
keymap in this dir should be found. I noticed that you have a typo in your question: the dir should be named
keymap and not
keymaps. Could this be the source of your problem?
Hey Thank you very much for the comment and input. Yes that is just a typo on the question so the issue still exists. I will try and move the ‘keymap’ directory over to my .config/nvim location. After all ‘spell’ is also under .config/nvim.
I was under the impression that config files go under ./config/nvim, and data files go under .local/share/nvim. I believe the built in package managers wants to put its downloaded packages in .local/share/site. I guess I have had keymap under there for eonsI, and never thought about moving it anywhere.
I’m also on neovim nightly and moved to the Lazy package manager (which probably has a lot of bugs to work out as well.) So I`m still very curious to find out what removed ‘site’ from my rtp. And if its a bug or a feature…
Yeah just a confirmation. The keymaps load fine when the keymap directory is relocated under .config/nvim. Maybe under .local/share/site was the old school way…