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

table definitions are not properly recognized #1148

Closed
Bilal2453 opened this issue May 16, 2022 · 1 comment
Closed

table definitions are not properly recognized #1148

Bilal2453 opened this issue May 16, 2022 · 1 comment
Labels
bug Something isn't working feat/LuaCats Annotations Related to Lua Language Server Annotations (LuaCats)
Milestone

Comments

@Bilal2453
Copy link
Contributor

Describe the bug
After creating an alias of a table, ---@alias foo {name: value} that is, and using that alias as a function param/return, the language server seems to not be able to recognize what type is it, reporting back any as the type.

image

In the above example, typing a table as the input anyways, and then pressing ctrl + space does show the right fields:

image

If the said type was used directly instead of creating it as an alias, it semi-works:

image

Although, it again never suggests the table fields until you explicitly do type an empty table {} and then press ctrl + space (As shown previously).

To Reproduce
See above screenshots.

Expected behavior

  1. The type is reported as table or as {name: value}.
  2. An auto-completion shows up when one types down {} in-place of the table type. Or
  3. An auto-completion shown up similar to the one for fun() types.

Environment:

  • OS: Linux, Fedora.
  • Client: VSCode, latest.
  • Version: 3.2.3
@sumneko sumneko added bug Something isn't working feat/LuaCats Annotations Related to Lua Language Server Annotations (LuaCats) labels May 24, 2022
@sumneko sumneko added this to the 3.3.0 milestone May 27, 2022
sumneko added a commit that referenced this issue Jun 9, 2022
@sumneko
Copy link
Collaborator

sumneko commented Jun 9, 2022

fixed

@sumneko sumneko closed this as completed Jun 9, 2022
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