-
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
Cannot detect declarations in other files #10
Comments
I think this is due to pest-parser/pest-ide-tools#24 ? |
Yeah, the language server does not support split grammars. There is a comment on the issue that tomtau mentioned that explains why. The solution for this would be for Pest files themselves to contain 'import' statements; something which I think is planned for Pest 3? |
Would you be able to put together something where if I put: // import: from/src/grammar.pest it would import from there or is that out of scope? |
It would need support on Pest's side - the LSP calls the Pest meta grammar and uses it's returned It's doable on the LSP side with some refactoring, but the feature doesn't seem to be used all that often and if Pest 3 is around the corner it seems like a waste of time to be honest. |
I have the following tree:
In
src/parse/grammar.rs
I have the following code:Notice the placement of
strings.pest
andvariables.pest
: howvariables.pest
is defined afterstrings.pest
.If I edit
variables.pest
, I get the following error:Where
anyString
is defined instrings.pest
. It compiles correctly, it's just the LSP not understanding this.The text was updated successfully, but these errors were encountered: