Skip to content

Inject library paths at runtime #2330

@musjj

Description

@musjj

Is there any way to pass library paths dynamically at runtime e.g. via environment variables like LUA_PATH?

My use-case is that I want to create an isolated development environment with Nix. Nix paths are hashed (/nix/store/rhb22df25vwdq5fr5dba8w873qciqgmg...) so they can change at any time, making static configs like .luarc.json ineffective.

Ideally, the server can pick up the current lua executable in the PATH and automatically detect all the libraries (this is how it works with pyright). Is this currently possible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions