-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
Position refactor #364
Position refactor #364
Conversation
apps/protocol/lib/lexical/protocol/convertibles/lexical.document.range.ex
Outdated
Show resolved
Hide resolved
apps/server/test/lexical/convertibles/lexical.plugin.diagnostic.result_test.exs
Outdated
Show resolved
Hide resolved
bbad0d1
to
9fd75b0
Compare
This will help with conversions
In order to get tests passing, I wrote an assert_normalized macro that normalizes both sides of an assertion before calling assert. This prevents spurious failures when using PositionSupport and comparing different positions' line and valid? fields, since building these via PositionSupport won't set those fields properly
67f7055
to
827808d
Compare
18e997c
to
bff02c6
Compare
3e21ec0
to
a035cd5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty confident in this. As you mentioned, there may be more we can do by looking further into errors.ex, but I think these changes are a good start and we're going to be building on them imminently, so there will be more opportunity to surface any weird behavior.
agreed, @zachallaun. I built this branch and have been using it as my main LSP for a couple days. No issues so far. |
@zachallaun and I realized that if you track the line that a position occurs on, you no longer need the document to do conversions. Watch this space.