Closed alanifotis closed 2 months ago
Meet the same problem in Powershell on Windows 11 and also on WSL (Ubuntu LTS) (both on windows terminal) using the current version of kickstart nvim. I have already check the prerequisites (git, make, unzip, gcc, ripgrep) and language installation.
Folks, do you have any language servers installed?
Type :Mason to get started.
@feoh Yes. Currently I use nvim for python. Same problem with clangd when I was using kickstart on wsl.
This is a recurring question, duplicates:
https://github.com/nvim-lua/kickstart.nvim/issues/816 Autocomplete keybindings not functioning as before
https://github.com/nvim-lua/kickstart.nvim/issues/851 How to use Autocomplete
And the answer is, the keymap was changed in the recent rewrite from <enter>
to <c-y>
so ctrl-y
to confirm a autocomplete selection. Try if that works.
If you don't like the c-y
keymap, here is how to restore to the previous "classic" keymaps:
diff --git a/init.lua b/init.lua
index 62d2c5c..ce2abb6 100644
--- a/init.lua
+++ b/init.lua
@@ -720,6 +720,11 @@ require('lazy').setup({
-- This will expand snippets if the LSP sent a snippet.
['<C-y>'] = cmp.mapping.confirm { select = true },
+ -- Classic completion keymaps
+ ['<CR>'] = cmp.mapping.confirm { select = true },
+ ['<Tab>'] = cmp.mapping.select_next_item(),
+ ['<S-Tab>'] = cmp.mapping.select_prev_item(),
+
-- Manually trigger a completion from nvim-cmp.
-- Generally you don't need this, because nvim-cmp will display
-- completions whenever it has completion options available.
For more info: https://github.com/hrsh7th/nvim-cmp?tab=readme-ov-file#recommended-configuration https://github.com/hrsh7th/nvim-cmp/wiki/Example-mappings
@feoh should we add that as a commented-out example? Should I open such a PR?
It does do the work. Thanks @dam9000 . I'll try to read the init before positing more question.
Thank you @dam9000 for your help i will close the issue now
Describe the bug
no key combination accepts autocomplete suggestion I've tried enter & enter + ctrl/shift/alt nothing makes it possible to accept the autocomplete
https://github.com/nvim-lua/kickstart.nvim/assets/44728074/6f849992-8d5b-4765-bb73-7d3743ee3538
PS. sorry if i'm opening this issue in the wrong place
To Reproduce
Desktop
Neovim Version
:version NVIM v0.10.0-dev-2947+ge1ca7a7bf Build type: RelWithDebInfo LuaJIT 2.1.1710088188 Run ":verbose version" for more info