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 text replacement for completion #78

Closed
evie-lau opened this issue Jul 14, 2022 · 1 comment · Fixed by #306
Closed

Fix text replacement for completion #78

evie-lau opened this issue Jul 14, 2022 · 1 comment · Fixed by #306
Assignees
Labels
enhancement New feature or request LCLS Liberty Config Language Server

Comments

@evie-lau
Copy link
Member

evie-lau commented Jul 14, 2022

When revisiting a partially typed line, and invoking the completion choice, the selected property gets appended to the existing line instead of replacing the entire line.

ie:

  1. Type com.ibm.
  2. Switch lines, bring cursor back to the end of com.ibm.
  3. Type ws.logging, and select anything
  4. Completion happens and ends up as com.ibm.com.ibm.ws.logging...

It looks like this can be modified by setting the TextEdit in the CompletionItem. InsertReplaceEdit can be used to specify the line and character positions for text insert and replace operations. The implementation may also depend on the Client Capabilities for the extension, which may vary per IDE extension. (ie. VSCode may support replace, but another IDE may not)

@evie-lau evie-lau added the enhancement New feature or request label Jul 14, 2022
@evie-lau evie-lau added the LCLS Liberty Config Language Server label Aug 24, 2022
@arunvenmany-ibm arunvenmany-ibm self-assigned this Oct 9, 2024
@arunvenmany-ibm
Copy link
Contributor

This is working fine now in all supported IDE's

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request LCLS Liberty Config Language Server
Projects
None yet
2 participants