Skip to content

Manual setup for SLua typechecking linting in VSCode

Tapple Gao edited this page Aug 4, 2026 · 1 revision

If you only want vscode to typecheck and lint your SLua code, and you don't care about syncing with the viewer or preprocessing, then you don't even need this plugin, as it doesn't do the 2 things you want. Here's how to replicate what this plugin does without needing to install this plugin, or connect to a viewer:

Luau Language server setup:

  1. Install the Luau Language Server (johnnymorganz.luau-lsp) extension in VSCode

  2. Open a new or existing workspace in VSCode.

  3. Create a folder named sl-vscode-plugin in your workspace's .vscode folder.

  4. Download these 2 files from the lsl-definitions repository into .vscode/sl-vscode-plugin:

    1. secondlife.d.luau
    2. secondlife.docs.json
  5. Create or edit .vscode/settings.json and add the following (with commas as needed):

    Windows:

        "luau-lsp.types.definitionFiles": {
            "sl-slua": ".vscode\\sl-vscode-plugin\\secondlife.d.luau"
        },
        "luau-lsp.types.documentationFiles": [
            ".vscode\\sl-vscode-plugin\\secondlife.docs.json"
        ]

    Linux/Mac:

        "luau-lsp.types.definitionFiles": {
            "sl-slua": ".vscode/sl-vscode-plugin/secondlife.d.luau"
        },
        "luau-lsp.types.documentationFiles": [
            ".vscode/sl-vscode-plugin/secondlife.docs.json"
        ]

You can follow similar steps to set up SLua typechecking and linting on any editor that luau-lsp supports. These are currently:

Selene setup:

  1. Install the Selene (kampfkarren.selene-vscode) extension in VSCode
  2. Open a new or existing workspace in VSCode.
  3. Create a folder named sl-vscode-plugin in your workspace's .vscode folder.
  4. Download secondlife_selene.yml from the lsl-definitions repository into .vscode/sl-vscode-plugin
  5. Create a file named selene.toml in the root of your workspace, with the following content:
    std = "luau+.vscode/sl-vscode-plugin/secondlife_selene"

Clone this wiki locally