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

Autocomplete using ctrl+space does absolutely nothing (or sometimes skip a line) #2718

Closed
hrqmonteiro opened this issue Dec 15, 2020 · 11 comments

Comments

@hrqmonteiro
Copy link

hrqmonteiro commented Dec 15, 2020

Result from CocInfo

## versions

vim version: NVIM v0.5.0-dev+944-g82100a6bd
node version: v14.13.1
coc.nvim version: 0.0.79-437fdaadab
coc.nvim directory: /home/hrq/.config/nvim/plugged/coc.nvim
term: xterm-256color
platform: linux

## Log of coc.nvim

2020-12-15T14:36:58.006 INFO (pid:11882) [services] - registered service "highlight"
2020-12-15T14:36:58.063 INFO (pid:11882) [language-client-index] - highlight started with 11898
2020-12-15T14:36:58.076 INFO (pid:11882) [services] - registered service "vimlsp"
2020-12-15T14:36:58.077 INFO (pid:11882) [services] - vim language server state change: stopped => starting
2020-12-15T14:36:58.080 INFO (pid:11882) [plugin] - coc.nvim 0.0.79-437fdaadab initialized with node: v14.13.1 after 169ms
2020-12-15T14:36:58.085 INFO (pid:11882) [language-client-index] - vimlsp started with 11905
2020-12-15T14:36:58.385 INFO (pid:11882) [services] - vim language server state change: starting => running
2020-12-15T14:36:58.390 INFO (pid:11882) [services] - service vimlsp started

Describe the bug

I am trying to set coc.nvim for the first time, and i am watching many configs and trying to reproduce them. I want the suggestions box to have the first suggestion selected, and i want to be able to autocomplete using Ctrl+Space.

Reproduce the bug

When i did :verbose inoremap there was nothing attributed to it. And not that i configurated the coc.vimfile, it returns me

i  <C-Space>   * coc#refresh()
        Last set from ~/.config/nvim/plug-config/coc.vim line 43

And i did source $HOME/.config/nvim/plug-config/coc.vimon my init.vim

So basically is all set correctly. But ctrl+space does nothing, it doesnt autocomplete when i start typing something and the suggestions box come up. And sometimes what it does is skip a line.

Also, on my coc.vim file, i have the basic configuration file from the README.

@chemzqm
Copy link
Member

chemzqm commented Dec 15, 2020

Could be your terminal not send that key codes to vim, use other key mapping instead,

@chemzqm chemzqm closed this as completed Dec 15, 2020
@hrqmonteiro
Copy link
Author

Could be your terminal not send that key codes to vim, use other key mapping instead,

I use alacritty, there are no keybindings assigned to Ctrl+Space in that.

@chemzqm
Copy link
Member

chemzqm commented Dec 15, 2020

Debug your vim, doesn't seems issue of coc.nvim

@hrqmonteiro
Copy link
Author

Is not an issue on my shell, you can check here if you want, neither on my vim, as you can see, i am able to pass a ctrl+space for other things in vim and it works, as i stated there.

It just won't work with coc and the coc#refresh command.

@chemzqm
Copy link
Member

chemzqm commented Dec 16, 2020

coc#refresh() does trigger completion only.

@make-github-pseudonymous-again

@hrqmonteiro Out of curiosity, have you tried sourcing your ~/.vimrc after vim is started?

@hrqmonteiro
Copy link
Author

@hrqmonteiro Out of curiosity, have you tried sourcing your ~/.vimrc after vim is started?

Hi, i actually use Neovim, i don't have a .vimrc file.

@make-github-pseudonymous-again

@hrqmonteiro Ok. I use vim. I tried to use the <c-@> shortcut but somehow it only works when I source the config file after vim has started. Before sourcing it I can see that the mapping is there, and that keystrokes get registered by vim (^V^@ in insert mode), but the mapping does not "work".

@JulianH99
Copy link

c-space does not work for me on either windows terminal nor wezterm under windows, though weirdly it works on kitty on linux

@samrocksc
Copy link

i too have the issue, i disabled all my plugins, and attempted it, and then reinstalled coc-tsserver. I think it may be with neovim itself somewhere.

@samrocksc
Copy link

@make-github-pseudonymous-again this method worked for me without the sourcing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants