lua-language-server icon indicating copy to clipboard operation
lua-language-server copied to clipboard

inject-field diagnostics when defining LOVE callbacks.

Open MikuAuahDark opened this issue 2 years ago • 3 comments

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

  1. Ensure to have LOVE Definition addon.
  2. Create new main.lua with content above.

Additional Notes

LOVE addon @class is not defined with (exact).

Log File

file_d%3A_Data_Development_love-11.3-win64_inochi2d.log

MikuAuahDark avatar Sep 08 '23 16:09 MikuAuahDark