This C file is where slua gets its globals. slua-analyze won't work without it unless it grows support for d.luau files sometime soon
There's 2 places that would be really nice to typecheck, where including luau-lsp would be vastly overkill:
But, this is impractical without a generator for EmbeddedBuiltinDefinitions.cpp
One other benefit of embedding the slua definitions has to do with the magic type functions. The short version: due to the order in which luau-lsp reads the definitions, luau-lsp is unable to use the best available typechecker logic for the functions table.freeze, table.clone, and table.pack. For the long version, see these comments, and the whole PR they are in:
This C file is where slua gets its globals.
slua-analyzewon't work without it unless it grows support ford.luaufiles sometime soonThere's 2 places that would be really nice to typecheck, where including luau-lsp would be vastly overkill:
But, this is impractical without a generator for
EmbeddedBuiltinDefinitions.cppOne other benefit of embedding the slua definitions has to do with the magic type functions. The short version: due to the order in which
luau-lspreads the definitions,luau-lspis unable to use the best available typechecker logic for the functionstable.freeze,table.clone, andtable.pack. For the long version, see these comments, and the whole PR they are in:tablemagic functionstable.freezemagic functiontable.clonemagic functiontable.packmagic function