-
Notifications
You must be signed in to change notification settings - Fork 39
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
Accepting completion of import statement with CTRL-Y deletes the entire line #15
Comments
Looks like your |
I don't think that is the problem. I have had no problems with |
It's expected, they're textEdits returned from language server, you can chekcout ouput channel https://github.com/neoclide/coc.nvim/wiki/Debug-language-server#using-output-channel to see them. |
Right, I assumed that the star imports were expected. i only mentioned it because the completion is deleting the line at random more often than not with no discernible cause. Am I incorrect in assuming that the language server should never give me a textEdit that deletes a line from my file immediately after inserting it using completion? I mean the deletion I am experiencing is not expected behavior, is it? |
The problem is I don't know how to reproduce this: |
Here is the output I get when I try to autocomplete I'm not sure, but I think the relevant part is lines 8339 -8494:
|
Got it
I have no idea why jdt.ls send this to client. |
According to specification
Coc should ignore |
Fixed on master of coc.nvim. |
I pulled the latest from coc.nvim on master. When I tried running
|
My bad, just fixed. |
It is working as expected now. Thank you very much. |
When I try to use
CTRL-Y
to accept completion while typingimport org.apache.commons.lang3.StringUtils;
the entire line gets deleted immediately after the insertion. This happens if I tryCTRL-Y
at any point afterorg
. Sometimes pressingCTRL-Y
partway through the statement will cause completion as a star import likeimport org.apache.*;
orimport org.apache.commons.*;
, but this happens randomly and I can't tell what is causing it to happen. Most of the time the entire line just disappears when I pressCTRL-Y
. I see no errors fromcoc#status()
or:CocInfo
. I should add that while trying to add the import to my file, I do not have the lang3 jar on the classpath yet, but it is offered by the completion anyway. I know that the program won't compile until I make the lang3 package available, but I don't think that I should be prevented from adding an import statement to a file because of this.The text was updated successfully, but these errors were encountered: