Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
TGTGamer opened this issue Feb 19, 2024 · 0 comments

Comments

@TGTGamer
Copy link
Contributor

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....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants