Skip to content

Conversation

WojciechMazur
Copy link
Contributor

Backports #18803 to the LTS branch.

PR submitted by the release tooling.
[skip ci]

By default, in Scala 2 completion prepend and only replace if there is
exact match. This PR unifies the experience between the Scala versions.
It seems more intuitive to work that way.

The change will be as follows (the order is: new logic, old logic and
scala 2 logic):


https://github.com/lampepfl/dotty/assets/48657087/c037c322-5613-4b95-a6e5-090b4e8827b6


In the future, it should be improved by changing implementation to use
`InsertReplaceEdit` instead of `TextEdit`. This will allow users to
decide which behaviour they prefer, but this has to be first implemented
in metals to properly handle the new logic, but for now the key is to
unify behaviours.
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#insertReplaceEdit
[Cherry-picked dc1e35a]
Base automatically changed from lts-18751 to lts-3.3 June 23, 2024 22:41
@WojciechMazur
Copy link
Contributor Author

No regressions detected in the community build up to lts-19083.

Reference

@WojciechMazur WojciechMazur merged commit c09877d into lts-3.3 Jun 23, 2024
@WojciechMazur WojciechMazur deleted the lts-18803 branch June 23, 2024 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants