secondlife / secondlife/sl-vscode-plugin

[LSL] Add support for a `.lslrc` file with aliases for includes

Open
#68 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
33
Forks
15
Avg merge
14h 50m
Merged PRs (30d)
9

Description

Luau already makes use of a .luaurc file and the plugin uses it's alias system in the slua require mechanism.

It would be nice to have a similar feature for LSL to make behavior between the two consistent and allow for include aliases to be stored with your project.

Proposed .lslrc format for now would only include the aliases section.

{
    "aliases": {
        "libs" : "D:\\secondlife\\lsl\\libraries",
        "my-lib" : "../../my-lib"
    }
}

Allowing for includes to follow a pattern like

#include "@libs/lib.lsl"
#include "@my-lib/my-lib.lsl"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the existing .luaurc alias handling and the plugin's slua require mechanism, then locate how LSL includes are resolved. Implement the proposed aliases-only .lslrc format and verify that @libs and @my-lib include paths resolve consistently with the examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.