Add Functions for Converting Between 'slicec' and 'tower_lsp' Types #59
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This function adds 2 helper methods for converting between
slicec::Span
->tower_lsp::Range
andtower_lsp::Position
->slicec::Location
These represent the same concepts, and thankfully we chose different names, so it's not too hard to follow.
It also cleans up
try_into_hover_result
.Currently, if the user hovers over something with no message to display, we return an
jsonrpc::Error
, which the caller just ignores and converts toNone
anyways. So, I changed the function to just returnNone
, instead of creating this intermediate error thing.