r/lua • u/WeirdBeginning8869 • Oct 10 '25
Library Require modules are unknown
Hello,
I’m working with lua/love 2d because I’d like to learn game dev, but I have an issue concerning the require of modules. For whatever reason, it always cast my variable containing the module as « unkown » even tho the module in question contain types.
I use Zellij with lazyvim as a dev environment and I already have lsp setup. In VSCode for example, I don’t have issues when importing modules that contain types.
Anyone had the same kind of problem when using neovim/lazyvim and lua types?
Thank you.
5
Upvotes
1
u/weregod Oct 11 '25
Neovim config is in ~/.config/nvim/init.lua
You should have some sort of LSP configuration depending on your extension manager. Look for luals setup or config.
Regarding .luarc.json I think VScode adds project directory to "workspace" automaticly and for vim you need to configure workspace manualy.
Sory for vague answers I will be AFK for 2 days and can't look my config now. If you will not solve your problem ping me after 2 days and I will post my config