Description
Describe the bug
Sometimes, when i work on a project for a longer time, the language server seems to forget require paths in my current workspace.
Consider this file structure (mine is larger) :
file: ./.vscode/settings.json
content:
...
"Lua.runtime.path": [
"modules/?.lua",
"modules/?/init.lua",
"modules/?/?.lua"
],
/* Attempt to fix weird require not resolving files issues */
"Lua.workspace.maxPreload": 1000000000,
"Lua.workspace.preloadFileSize": 1000000000,
...
...
file ./modules/file.lua
content:
module = { }
function module.foo() end
return module
file: ./modules/complicated.lua
content:
local file = requrie "file"
file: ...
when I open vscode with no file opened and then open complicated.lua
, file won't get any hints. However if i open file.lua
and then go back in complicated.lua
it suddenly knows its existence and then shows all hints again.
To Reproduce
Thats the problem, I don't know how to reproduce this problem, since all attempts failed and the server could resolve any path. I tried to delete ~/.config/Code/User/workspaceStorage
to delete any malformed caches, but the problem seems to persist. Whenever I need autocompletion for a specific file, first i need to open that file.
Environment (please complete the following information):
- OS: Kubuntu
- Client: VSCode
Any ideas what could cause that problem?