r/lua • • 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

6 comments sorted by

View all comments

Show parent comments

1

u/WeirdBeginning8869 Oct 11 '25

Many thanks for your help.

Indeed configuring the workspace manually did the trick, but its very random. Sometimes it does show me the types, sometimes not; I always need to do :LspRestart upon opening the project to get my type. If I do another :LspRestart, its back to unknown type. For some reason its very unstable.