Type Support
This guide will walk you though setting up working LSP type support for the Discord-Luau package.
Context
The Luau language has support for Alias declarations, however, Luau-LSP requires you to do some additional setup to enable these alias declarations to function.
Since the Discord-Luau package uses Luau language aliases, you’ll need to set up some additional configuration to get functional type support.
Git Submodules
-
Create a
.vscode/settings.json
file in your project root, IF there’s not one already available. Lune should of already created this file as we need to do some additional setup for the Lune runtime anyway -
If not already preasent, please add the following to the
.vscode/settings.json
file; -
Add the following to the
luau-lsp.require.directoryAliases
object; -
Restart Luau-LSP, check to see if the library can now resolve the require aliases.