Go to definition fails on the last character of a reference #3308
Labels
bug
Something isn't working
help-wanted
Extra attention is needed
pinned
This issue or pull request is pinned and won't be marked as stale
server
This pull request should be included in the server gem's release notes
Currently, we fail to locate the target for a go to definition request if the cursor is immediately after the reference the user is trying to jump to. For example:
Initially, I thought this implementation was correct, since the reference's location given to us by Prism really does not cover that one extra character. The cursor is in the next immediate character, not on top of the reference.
However, I checked what other LSPs do and apparently they do catch the reference even if the cursor is one character beyond.
I think we have two possible solutions for this:
If this works properly, without causing any weirdness in one of our features, then this is the appropriate solution.
The text was updated successfully, but these errors were encountered: