Skip to content

[Feature Request] extended import utilising package manager to provide exportability #1008

Closed
@TGTGamer

Description

@TGTGamer

Is your feature request related to a problem? Please describe.
Extension of the import utility to enable user to import from node_modules folders, enabling the ability to extend from external packages.

Describe the solution you'd like
A simple way to extend from node_modules folders. From the looks of it, an refactor of

export function resolveImportUri(imp: ModelImport): URI | undefined {
if (imp.path === undefined || imp.path.length === 0) {
return undefined;
}
const dirUri = Utils.dirname(getDocument(imp).uri);
let grammarPath = imp.path;
if (!grammarPath.endsWith('.zmodel')) {
grammarPath += '.zmodel';
}
return Utils.resolvePath(dirUri, grammarPath);
}

I assume there would be an additional step somewhere within the language file, and probably within the vscode extension, however haven't yet discovered those locations (will update once I have)

Describe alternatives you've considered
Keeping all my files in a single project and making endless copies of them into each individual project. Meaning there's no single source of truth, making it easy for one scheme to fall out of sync with another....

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