Skip to content

table definitions are not properly recognized #1148

Closed
@Bilal2453

Description

@Bilal2453

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfeat/LuaCats AnnotationsRelated to Lua Language Server Annotations (LuaCats)

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions