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.
CHANGELOG.md
if this change could be valuable to usersThis PR reimplements completion lens from #1968, with similar limitations
r
and there's a suggestion for println!()', then it won't display that as then lens since it doesn't start with 'r'.There is also various added comments to the completion logic, and some rearranging of logic.
I've changed the
config
font size functions to fallback, which I believe is the more correct option based on the docs we have for them. As well, usingfont_size
directly whenerror lens font size == 0
has the issue that then error lens font size won't be clamped to a reasonable value likefont_size()
does, which this fixes.I'm a bit uncertain that storing that last editor id is the best method for completion lens.
Updating the document's completion lens needs the
EditorData::cursor
field, to get the offset. However, it is received inwindow_tab.rs
and thus wouldn't know which editor data it should utilize.I thought of passing the
EditorId
as a field on the request, but I don't think that's a better solution either...