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

Enable grammar imports from node_modules #1376

Open
msujew opened this issue Feb 9, 2024 · 0 comments
Open

Enable grammar imports from node_modules #1376

msujew opened this issue Feb 9, 2024 · 0 comments
Labels
grammar Grammar language related issue

Comments

@msujew
Copy link
Member

msujew commented Feb 9, 2024

Right now, Langium only allows to import other grammars from a relative perspective. We might want to enable a behavior similar to JS/TS in which a non-relative import automatically leads to an import from node_modules. I.e.:

// current
import '../../node_modules/package/src/grammar';
// goal
import 'package/src/grammar';
// maybe even just (and add a way to discover grammars in the package.json)
import 'package';
@msujew msujew added the grammar Grammar language related issue label Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
grammar Grammar language related issue
Projects
None yet
Development

No branches or pull requests

1 participant