Skip to content

Fringe Use Case: Different environments in different parts of the file #3164

@SlashScreen

Description

@SlashScreen

This may seem like a ridiculous idea, and it is, but a project I am working with called Recoil Engine has a concept called "gadgets", which run in different contexts ("synced" or "unsynced") which provide different environments based on when the gadget is executed. This is a weird way of doing it, sure, but it's a 20 year old codebase.

My question is if it would be possible to provide LS support for these different contexts by offering some kind of annotation like --- @context synced via a plugin to change what is available in different parts of the file.

Relatedly, would it be possible to offer different environments based on filepaths? for example, Recoil's UI stuff would be exposed in /luaui but not /luarules.

Is it also possible to mark a function as being "virtual"?

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