Skip to content
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

fix: use textEdit for completion items insertion #232

Merged
merged 4 commits into from
Sep 17, 2024
Merged

Conversation

wkillerud
Copy link
Owner

@wkillerud wkillerud commented Sep 14, 2024

The edge cases in different editors with regards to word boundaries has been too high (even for syntaxes in the same editor).

Since perhaps not all clients support it, adopting this without checking for clientCapabilities would be a breaking change. We keep the existing behavior for backwards compatibility. Nevermind, I'm looking at it wrong. From 3.16 is the new InsertReplaceEdit. textEdit is as old as the spec.

TODO:

  • Add textEdit variant of all completion items.
  • Use clientCapabilities to decide whether or not snippets should be used (while we're at it)
  • Manual testing in VS Code
  • Manual testing in Sublime Text
  • Manual testing Helix
  • Update the automated tests with new assertions
  • Update documentation
  • Call out now unused settings in release notes

Replaces #231

For #230

The edge cases in different editors with regards to word boundaries
has been too high (even for syntaxes in the same editor).
@wkillerud wkillerud marked this pull request as ready for review September 17, 2024 18:34
@wkillerud wkillerud merged commit 93bb668 into main Sep 17, 2024
5 checks passed
@wkillerud wkillerud deleted the completion-textedit branch September 17, 2024 18:45
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.

1 participant