-
Notifications
You must be signed in to change notification settings - Fork 8
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
Unrecognised rules with grammars split across multiple files #24
Comments
This is hard because there isn't an If I did remember that correctly, we might have to put in a temporary solution like adding a |
Can there be a plugin config for users to specify whether or which grammars to load together? |
Maybe yeah |
Maybe a project-level/workspace-level setting, e.g.: https://code.visualstudio.com/api/references/contribution-points |
We already have some config so this will be fine. I'd like to keep a track of those RA issues that might allow a kind of plugin system though |
As far as I can tell, linked grammars work by just doing
Result:
Imagine we want to rename
Since the LSP thinks that We might need to rethink the |
Would the meta-grammar extension ("use base") help? One issue for that is how to interpret it in the file-less pest_vm environments. |
If there was an explicit import statement, the LSP would probably not require any modifications for this issue to be fixed. I'm not sure what the best way forward is. Maybe a poll in the server again |
@huacnlee any thoughts? |
It would also make more semantic sense to have a dedicated statement arguably |
This should probably be revisited with Pest V3, it seems too awkward to fix for now |
When rules defined in one pest file are used in a different pest file, as per https://pest.rs/book/grammars/grammars.html#load-multiple-grammars
( e.g. https://github.com/pest-parser/pest/blob/master/derive/examples/base.pest which is then used in https://github.com/pest-parser/pest/blob/master/derive/examples/calc.pest ), the extension will report errors of undefined rules for the names defined in a different file (even though there is no problem when building it thanks to pest-parser/pest#758 )
The text was updated successfully, but these errors were encountered: