-
-
Notifications
You must be signed in to change notification settings - Fork 364
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
BSP: Incorrect range end position in problem reporter #1011
Comments
So I didn't really realize this at the time, but this actually shouldn't be an issue for Metals. Metals actually takes that diagnostic and expands the range to the token in order to keep diagnostics alongside sytnax errors when you type. So when you look at the |
So this isn't really an issue anymore? |
Correct. At least in the LSP world, if you look at the expanded range that LSP will report to the client, it will be correct. Metals actually has the ability to expand that point to the full symbol. I sort of misunderstood this in the beginning until the IntelliJ folks mentioned it as well. I believe this can be closed now. |
Great, thanks for clarifying. |
Originally posted by @ckipp01 in #999 (comment)
One other thing that I do notice though is that the diagnostic from Mill is as follows:
Whereas both with sbt and with Bloop it's:
It still seems to work fine (I think there is some magic on the LSP client side) to maybe highlight the full symbol, but it'd be better to correctly capture the entire range and not return 15 for both start character and end character.
If it helps at all, here is the code sbt uses to get the range from the
Problem
.https://github.com/sbt/sbt/blob/13b09bcd8fa0fde86aa4f4f8d7089fcb18e345c6/main/src/main/scala/sbt/internal/server/BuildServerReporter.scala#L133-L159
The text was updated successfully, but these errors were encountered: