Skip to content

Don't use @roblox prefix for non-roblox definition + documentation files #971

@WolfGangS

Description

@WolfGangS

As mentioned in issue #970 Secondlife is looking to add luau

In my efforts to create typedefs etc, i have found that the api documentation format requires the use of @roblox prefix for every entry to be picked up.

I suspect this may be the spot at fault

luau-lsp/src/LuauExt.cpp

Lines 56 to 60 in a005567

Luau::LoadDefinitionFileResult registerDefinitions(Luau::Frontend& frontend, Luau::GlobalTypes& globals, const std::string& definitions)
{
// TODO: packageName shouldn't just be "@roblox"
return frontend.loadDefinitionFile(globals, globals.globalScope, definitions, "@roblox", /* captureComments = */ false);
}

it would be nice to clean this up, I'm still reading over the project, to see if i could contribute this change myself and how it would be controlled / what it would affect.

I suspect tying it into the luau-lsp.platform.type config may not work out as I thought it would at first.

An alternative may be issue #271 but i see that is still blocked on #885

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions