Getting Started
Editor Setup

Editor Setup

Lune prioritizes developer experience, and as such type definitions and documentation are provided for several editors and tools without any additional downloads. This guide will help you get set up with your editor environment.

Luau Language Server

Lune provides type definitions and documentation using the open source Luau Language Server, also known as luau-lsp (opens in a new tab).

These steps assume you have access to a terminal, that you have already installed Lune, and that it is available to run in the current directory.

Step 1

Run the following command in your terminal to generate Luau type definitions for your installed version of Lune:

lune setup

Step 2

Verify that type definition files have been generated, these should be located in your home directory and you can list them using ls:

ls ~/.lune/.typedefs/

Your currently installed version of Lune should appear, along with any previously installed versions you have type definitions for, when running this command.

Step 3

Modify your editor settings. If you are using Visual Studio Code you can do this either by using the settings menu or by manually pasting these settings in your settings.json file:

"luau-lsp.require.mode": "relativeToFile",
"luau-lsp.require.directoryAliases": {
	"@lune/": "~/.lune/.typedefs/x.y.z/"
}

These settings will:

  • Set the require mode to work with Lune
  • Add type definitions for Lune built-in libraries

NOTE: If you already had a .vscode/settings.json file in your current directory the type definition files may have been added automatically!