lua-language-server
lua-language-server copied to clipboard
inject-field diagnostics when defining LOVE callbacks.
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Windows
What is the issue affecting?
Diagnostics/Syntax Checking, Libraries
Expected Behaviour
This should be clean.
local love = require("love")
function love.load() -- no diagnostics here
end
Actual Behaviour
local love = require("love")
function love.load() -- Fields cannot be injected into the reference of `love` for `load`. To do so, use `---@class` for `love`. (inject-field)
end
Reproduction steps
- Ensure to have LOVE Definition addon.
- Create new
main.luawith content above.
Additional Notes
LOVE addon @class is not defined with (exact).