-
Notifications
You must be signed in to change notification settings - Fork 23
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
Eat existing content after apply completion without TextEdit #270
Comments
can you provide the requests/responses for the completion+resolve |
Could tou share your full lsp traces |
Just one question have you tested your usecase with our lsp4ij repository? Have you the same problem with MPLs? If it works or not it should be good to add a test withbyour usecase. Please share your lsp traces |
I have installed your Liberty vscode extension and try the completion, it doesn't work (no completion): But I see in vscode output:
I supsect that you rproblem is with textedit that you don't generate, or if yiu don't want to use textedit, perhaps filterText could work, I don't know, but if it doesn't work on vscode it will not work on IJ. |
Fixes redhat-developer#270 Signed-off-by: azerr <[email protected]>
@turkeylurkey for completion property value, there is indeed a problem that I can reproduce with a test with #272 The test fails when completion is applied:
I will investigate the problem, but IMHO I think you should generate textEdit inside your completion for bootstrap.properties |
Fixes redhat-developer#270 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#270 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#270 Signed-off-by: azerr <[email protected]>
The reference to #189 in the original post was supposed to be a reference to the change that introduced the problem. The issue is that in lsp4ij/src/main/java/com/redhat/devtools/lsp4ij/features/completion/LSPCompletionProposal.java Line 211 in b8a6db6
Then in lsp4ij/src/main/java/com/redhat/devtools/lsp4ij/features/completion/LSPCompletionProposal.java Line 323 in b8a6db6
I think this explains the change in behaviour introduced by pull request #189. We need a way to detect if Here is the response from the language server and we see it is using "label" for the result. I have not tested with LSP4MP and since it uses textEdits it follows a different code path in LSP4IJ.
|
After re reading the lsp spec when completion item has no textedit the lsp client must compute the Word range. We did that with tokenRange utility , I will rename to getWordRangeAt. But we need to improve it by using too psi élément range if it is relevant. Indeed in your case you have a property key which can have some dot so our generic tokenRange will not cover the full property key. To improve that in our case we should use the psi élément which is the psi property key to replace the full propery key when completion is applied. We could use too texmatr info for another case. I will work on that and I will add another test with mp and qute ls completion. But IMHO it is better to report completion with textedit. I wonder if in eclipse ide with lsp4e you have this sale problem? |
And thanks for your lsp traces but I have already collected from vscode and start to write some tests with thise traces |
Yes, I just noticed that my trace was basically the same as what you had! :) |
I tested with Liberty Tools for Eclipse v24.0.3 and did not hit this issue. eclipse-completion.mp4 |
Fixes redhat-developer#270 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#270 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#270 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#270 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#270 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#270 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#270 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#270 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#270 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#270 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#270 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#270 Signed-off-by: azerr <[email protected]>
Fixes #270 Signed-off-by: azerr <[email protected]>
When we type a string that contains a dot as a key and use completion then part of the key string is replaced by the replacement text and part of the key is retained. Formerly the whole key string was replaced by the replacement text. For example, we type 'com.ibm.ws.log' and see the replacement options in the editor:
Then select one item and see that the leading 'com.ibm.ws.' is retained rather than being replaced.
Another example where no dot is used. First select one replacement option.
Then type '=' and ctrl-space.
Select one of the replacement strings and all the text is replaced.
See #189.
The text was updated successfully, but these errors were encountered: