-
-
Notifications
You must be signed in to change notification settings - Fork 953
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 auto completion #3290
Comments
I can confirm. I am facing the exact same issue. |
@asadmoosvi Have you recently updated |
@NguyenMinhKhanhBK as I comment in fannheyward/coc-rust-analyzer#844, I still can't reproduce this error. mini vimrc: set nocompatible
set runtimepath^=~/.config/nvim/plugged/coc.nvim
filetype plugin indent on
syntax on
set hidden CocInfo:
install |
@NguyenMinhKhanhBK nvim, I'll test vim now. |
Thanks @fannheyward , I also try NVIM right now |
Here have a look at this asciinema. As you can see, it does not show the correct completions. I expect it to show the correct methods for console. It was working fine before I updated today. https://asciinema.org/a/hLtQWkI0PpeIyU0DARX6gkcCY |
Reproduced with vim
|
@chemzqm I am still experiencing this bug.
coc-clangd: 0.14.1 |
cc @chemzqm I can reproduce this bug with vim once in a while, Edit: still happens sometimes. |
Here is a simple wordaround:
Just checkout to previous commit 😄 |
I have the same problem while typing C++ code. Have you solved it? |
@NguyenMinhKhanhBK @Andoku @hanleylee I've checked this again, and can't reproduce with vim 8.2.3600, can you give it a test? |
@user84441 I can't understand your issue from the screenshot. |
It probably looks like a problem where you expect @user84441 I think it would be even easier to understand the situation if you prepare a "movie" (mp4) instead of a still screen capture. By the way, I was not able to reproduce this problem. |
|
Maybe,I can give you an example which can occur this bug. My system is ubuntu18.04.6 My mini .vimrc is My coc-settings.json is My CocInfo is vim version: VIM - Vi IMproved 8.2 8023458 2021-11-19T15:20:25.606 INFO (pid:4647) [services] - registered service "languageserver.svlangserver" My test code is hello.cpp: private: My process of generating a bug is That is all. Thanks very much. |
@user84441 I tried with this mapping described in the README of coc.nvim written by fannheyward. The problem was not reproduced. By the way, I always use inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm()
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>" Capture(mp4):
coc-issue-3290-1.mp4 |
@Banana-Two try vim 8.2.3600, tested with your hello.cpp, |
Okay then. It should be the first item in the complete list. Another example. C++. I'm trying to complete const with con FAST with enter:
2021-11-19.11-52-38.mp4 |
@user84441 repeated about 20 times, still can't reproduce, have no idea about this. |
@fannheyward |
|
I can't reproduce with vim 8.2 and latest master of coc. Seems it was fixed |
I am still experiecing the same problem
2021-11-20.00.41.39.mov |
|
These methods can avoid it Second method: Third method: |
@Andoku as I commented above, try vim 8.2.3600+, I can't reproduce this now. |
Just here to report that I have the exact same issue (I'm on neovim Any suggestions? I'm so used to pressing enter for the first time that this is driving me nuts. EDIT: Sorry, turns out my issue is "similar", when I press Enter instead of auto-completing and selecting the first item I get a new line (no text). |
Can't reproduce, try lastest coc.nvim. Or provide connection log, please follow these steps:
|
@chemzqm @fannheyward I am on the latest release branch and I am still experiencing this issue. My vim version is 8.2.3956. I don't have this issue on neovim 0.5.1. GIF for the issue: Log file for operations in the gif: |
After updating to d454b57 on the release branch, I don't have this problem any more. |
Same here, I used to get super annoyed by this, but after updating it on the release branch today, the problem magically disappeared! Just for reference, my config is:
My language server is {
"languageserver": {
"clangd": {
"command": "clangd",
"filetypes": [
"c",
"cpp"
],
"rootPatterns": [
"compile_commands.json",
".git"
],
"args": [
"--compile-commands-dir=build",
"--compile_args_from=filesystem",
"--all-scopes-completion",
"--background-index",
"--clang-tidy",
"--cross-file-rename",
"--completion-parse=always",
"--completion-style=detailed",
"--function-arg-placeholders",
"--header-insertion-decorators",
"--header-insertion=never",
"--limit-results=0",
"--pch-storage=memory"
]
}
} |
Me too. After updating the lastest version of coc.nvim, the problem of incorrect auto completion disappear. But another problem occurs. After using ”enter“ key to choose the completion word, the result of withdrawal will be modified. Only vim will have this question. Only using ”enter“ key to finish completion will have this problem.
The question is described in detail as following: This my minimum .vimrc: |
@Banana-Two Can't reproduce with same vim version, could be issue with vim on your terminal. Try update coc.nvim and if the problem still exists, open new issue. |
Result from CocInfo
Describe the bug
I use TAB to trigger suggestion and ENTER to select the completion and it worked well before. After PlugUpdate, the completion stops working with incorrect texts inserted (tested with Go and Rust language). Please take a look at this gif for more details: https://imgur.com/a/mI7Shsy
Reproduce the bug
We will close your issue when you don't provide minimal vimrc and we can't
reproduce it
mini.vim
with:CocConfig
Start (neo)vim with command:
vim -u mini.vim test.go
Operate vim (e.g. Go language)
Screenshots (optional)
If applicable, add screenshots to help explain your problem.
The text was updated successfully, but these errors were encountered: