NightrainsRbx / RobloxLsp

Roblox Luau Language Server based on Lua by sumneko.
https://devforum.roblox.com/t/roblox-lsp-full-intellisense-for-roblox-and-luau/717745
MIT License
211 stars 49 forks source link

Autofill broke down when value is assign as a type of recreation of a metatable #225

Closed Hezaus closed 1 year ago

Hezaus commented 1 year ago

Autofill supposed to work when Value are set like the type they are assigned to. Code:

type Metatable = { Print: (self: any, Text: string) -> nil } & (self: any, Text: string) -> nil

local Table = { ["Metatable"] = {} :: Metatable }

Table: --Autofill are supposed to show here

On Roblox Studio it work fine image

Although I can use the metatable directly and set typeof for it, which work but it will limit the ability to dynamic type-check when creating new object.

Hezaus commented 1 year ago

I just knew luau lsp exits. Installing luau lsp will fix this issue.