-
Notifications
You must be signed in to change notification settings - Fork 40
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
Incorrect parameter completion #63
Comments
Try update coc.nvim to latest version. |
I believe I've executed: Before, I've executed
Not sure if this is related. |
I have managed to reproduce it on my personal workspace by deleting the following folder: rm -rf ~/.config/coc/extensions/coc-java-data Then running again
Waiting for the server to be started and then doing above procedure. |
I'm getting this same issue. vim version: NVIM v0.5.0-416de69 I'm on the latest version of vim and coc.nvim. Not sure what's up though |
I've got the same issue. I did manually update to the latest jdt.ls a few days ago, but I am not sure if I had the issue before too... |
By completely reinstalling coc.nvim and then coc-java I have the same issue. |
Temporary workaround: inoremap <silent> <c-c> <esc>v:s/${[0-9]://g<CR>v:s/}//g<CR>:nohl<CR>f( In insert mode, CTRL+C replaces
|
Unable to reproduce, try upgrade https://github.com/neoclide/coc-snippets |
Tried, same issue. I've also tried a minimalistic configuration with nvim 0.4.3 and 0.5:
Doesn't seem to be related to another extension than coc-java 🤔 |
Try minimal vimrc. |
I've edited previous post, I've tried with above minimal vimrc but same result. |
Please upload verbose output from jdt.ls https://github.com/neoclide/coc.nvim/wiki/Debug-language-server#using-output-channel |
Got it, should be bug of jdt.ls.
the insertTextFormat should be 2 for snippet. Old version of jdt.ls work as expected. |
which jdt.ls version works ? |
The latest milestone 0.48.0 is working for me. |
thanks, will have a try |
The latest jdt.ls milestone 0.50.0 is out and appears to cause this same completion issue. Could it be a compatibility issue between the coc language client and jdt.ls? I've tested both vscode-java and coc-java using the same jdt.ls server version 0.50.0. It works fine with vscode, but not with coc. I can see in the logs the capabilities request is slightly different between the two. Perhaps that difference is leading to the jdt.ls server not responding with the correct value for "insertTextFormat"? Or perhaps its some other client configuration sent to the server that is different and leading to the faulty result? |
IMO, it should be fixed, we can not always use an old jdt.ls version. |
I've made a fix to disable insertTextFormat for resolved item. |
Fixed on latest release branch of coc.nvim. |
Versions
Messages
Output channel: java
Describe the bug
This is the result after completing parameter for a function:
I would expect instead:
Reproduce the bug
mini.vim
with:Main.java
with:list.
then select methodadd(int index, String element)
then press ENTER.I believe this has happened after I've updated
jdt.ls
withjava.updateLanguageServer
.The text was updated successfully, but these errors were encountered: