nvim-lua / completion-nvim

A async completion framework aims to provide completion to neovim's built in LSP written in Lua
Apache License 2.0
973 stars 78 forks source link

No completion #405

Open prsh11 opened 3 years ago

prsh11 commented 3 years ago

My init.vim

lua << EOF

local nvim_lsp = require('lspconfig')
local on_attach = function(_, bufnr)
    require'completion'.on_attach()
end
local servers = {'pyright', 'clangd'}
for _, server in ipairs(servers) do
  nvim_lsp[server].setup {
    on_attach = on_attach,
  }
end
EOF
" Use completion-nvim in every buffer
autocmd BufEnter * lua require'completion'.on_attach()

" Use <Tab> and <S-Tab> to navigate through popup menu
inoremap <expr> <Tab>   pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"

" Set completeopt to have a better completion experience
set completeopt=menuone,noinsert,noselect

" Avoid showing message extra message when using completion
set shortmess+=c
imap <tab> <Plug>(completion_smart_tab)
imap <s-tab> <Plug>(completion_smart_s_tab)

How to reproduce On pressing tab, don't get autocomplete.

Expected behavior Autocomplete menu appears

Shougo commented 3 years ago

Please read other issues. Your issue is already duplicated.

https://github.com/nvim-lua/completion-nvim/issues/403 https://github.com/nvim-lua/completion-nvim/issues/399

prsh11 commented 3 years ago

Please read other issues. Your issue is already duplicated.

403 #399

I have tried reading them. I couldn't reproduce from them. Can you tell me what I am doing wrong in my config?

Shougo commented 3 years ago

The important thing is completion-nvim is broken currently. It is not maintained well. I recommend for you to use other auto completion plugins instead.

PolarianDev commented 3 years ago

@notprash

What version of neovim are you running? if you are unsure run nvim --version

PolarianDev commented 3 years ago

The important thing is completion-nvim is broken currently. It is not maintained well. I recommend for you to use other auto completion plugins instead.

It is open source however, this therefore means other people could still contribute, there are other auto-completion plugins however some people may not wish to move, and furthermore may prefer this plugin.

As of right now I run v0.5.0, and have neovim ignored by pacman, it does mean I am stuck on an older version and I recommend anyone who does not wish to use another plugin to downgrade their neovim version until a patch has been merged, this is provided the solution outlined in #399 did not work for you.

Shougo commented 3 years ago

Yes. You are right. And the fix is already exists. https://github.com/nvim-lua/completion-nvim/pull/400

But it is not merged yet... I don't know why.

prsh11 commented 3 years ago

@notprash

What version of neovim are you running? if you are unsure run nvim --version

I am using neovim nightly, for treesitter. That's why it's not working