Problem: .luarc.json used the flat dotted-key format which is not the
canonical LuaLS schema. The busted library was also missing, so LuaLS
could not resolve types in test files.
Solution: rewrite .luarc.json using nested objects and add
${3rd}/busted/library to workspace.library.
16 lines
325 B
JSON
16 lines
325 B
JSON
{
|
|
"runtime": {
|
|
"version": "LuaJIT",
|
|
"path": ["lua/?.lua", "lua/?/init.lua"]
|
|
},
|
|
"diagnostics": {
|
|
"globals": ["vim"]
|
|
},
|
|
"workspace": {
|
|
"library": ["$VIMRUNTIME/lua", "${3rd}/luv/library", "${3rd}/busted/library"],
|
|
"checkThirdParty": false
|
|
},
|
|
"completion": {
|
|
"callSnippet": "Replace"
|
|
}
|
|
}
|