Open
Description
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Linux
What is the issue affecting?
Completion
Expected Behaviour
Autocomplete should complete methods on instances of (exact) classes.
Expected completion for a normal class:
Actual Behaviour
Methods are not completed.
Reproduction steps
VSCode project with v3.11.0 plugin.
All defaults, no .luarc.json
.
Ctrl-space at last line.
---@class (exact) Point
--@class Point
---@field x number
---@field y number
local Point = {}
function Point:new(o)
o = o or {}
setmetatable(o, self)
self.__index = self ---@diagnostic disable-line: inject-field
return o
end
---@param i integer
function Point:add(i)
self.x = self.x + i
end
---@type Point
local point = Point:new({ x = 1, y = 2 })
point:
Additional Notes
Many thanks for all the fantastic work - luals makes me so much more productive!
Log File
Metadata
Metadata
Assignees
Labels
No labels