I use Neovim (v0.9.5) and lazy to manage my plugins. My current config structure is as follows:
├── init.lua ├── lazy-lock.json └── lua └── enrique ├── core │ ├── init.lua │ ├── keymaps.lua │ └── options.lua ├── lazy.lua └── plugins ├── ... ├── which-key.lua └── ... I am trying to set up keymaps using which-key. So I need to add the line:
local wk = require("which-key") According to this documentation
However as soon as I add such line, I get this error:
Error detected while processing /home/enrique/suse-eo/config/nvim/init.lua: E5113: Error while calling lua chunk: /home/enrique/.config/nvim/lua/enrique/core/keymaps.lua:6: module 'which-key' not found: no field package.preload['which-key'] no file './which-key.lua' no file '/usr/share/luajit-5_1-2.1.0-beta3/which-key.lua' no file '/usr/local/share/lua/5.1/which-key.lua' no file '/usr/local/share/lua/5.1/which-key/init.lua' no file '/usr/share/lua/5.1/which-key.lua' no file '/usr/share/lua/5.1/which-key/init.lua' no file './which-key.so' no file '/usr/local/lib/lua/5.1/which-key.so' no file '/usr/lib64/lua/5.1/which-key.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: [C]: in function 'require' /home/enrique/.config/nvim/lua/enrique/core/keymaps.lua:6: in main chunk [C]: in function 'require' /home/enrique/.config/nvim/lua/enrique/core/init.lua:2: in main chunk [C]: in function 'require' /home/enrique/suse-eo/config/nvim/init.lua:1: in main chunk The only similar issue I've found is this. However I don't really understand the how to apply that solution to my case since I don't have a lua/config/ directory.
I really hope someone can help me! Thanks in advance!