-
Notifications
You must be signed in to change notification settings - Fork 72
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
Inconsistencies with Loc in coqc and vscoq #950
Comments
I don't know exactly why, but it seems the loc I generate are OK for coqc, but get somehow shifted by vscoq. |
Is this only with elpi stuff or can you reproduce with something simple like |
I think it is only elpi, but also only with code, since with coqc locs are ok |
So we compute the lsp range using the Loc.t from Coq via: Looking at the code we seem to use
Other than that it does indeed seem to be 0 based. Maybe there is a difference in how you instantiate bp and ep but not other members of that record which lead to the inconsistencies ? |
Here the problem: it seems that the ranges written in the terminal and the ranges sent via lsp are 1-based v.s. 0-based.
In this case I clicked on the error location as printed in the terminal, and code selects the exact text:
Here I peek the lsp traffic for the same error. The line number was decreased by 1, so I guess it is zero based.
The column numbers are the same, so (assuming they are also 0 based)< are coloured 1 char to the right.
The text was updated successfully, but these errors were encountered: