Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

只标记field的class #817

Closed
HiKit opened this issue Nov 24, 2021 · 0 comments
Closed

只标记field的class #817

HiKit opened this issue Nov 24, 2021 · 0 comments
Labels
bug Something isn't working feat/LuaCats Annotations Related to Lua Language Server Annotations (LuaCats)

Comments

@HiKit
Copy link

HiKit commented Nov 24, 2021

TestA.lua

---@class TestA
---@field A number
_G.TestA = {}

Main.lua

print(TestA)

如果只给class标记field,发现无代码提示,如下图
image


如果随意给class增加一个方法,结果会有代码提示
TestA.lua

---@class TestA
---@field A number
_G.TestA = {}

function TestA:Test()

end

image


现在不确定是emmylua的特性如此,还是一个插件bug?

@sumneko sumneko added bug Something isn't working feat/LuaCats Annotations Related to Lua Language Server Annotations (LuaCats) labels Nov 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feat/LuaCats Annotations Related to Lua Language Server Annotations (LuaCats)
Projects
None yet
Development

No branches or pull requests

2 participants