completion-nvim icon indicating copy to clipboard operation
completion-nvim copied to clipboard

Upstream nvim at 23fe6dba1 breaks tab completion

Open arsham opened this issue 4 years ago • 3 comments

My testing minimal init.vim The part of the mapping that is relevant:

require('astronauta.keymap')
vim.keymap.inoremap{'<Tab>',   require("completion").smart_tab,   buffer=true, silent=true}
vim.keymap.inoremap{'<S-Tab>', require("completion").smart_s_tab, buffer=true, silent=true}

How to reproduce Compile the upstream at this commit. Use tab completion.

Expected behaviour Completion popup to show up, but it doesn't.

I can confirm that completion works at this commit.

arsham avatar Sep 06 '21 16:09 arsham

The handler function's signature in source/lsp.lua needs to be updated, possibly adding a backwards-compatible wrapper for neovim versions prior to this commit. As an intermediate hack, this should help:

-  vim.lsp.buf_request(params.bufnr, 'textDocument/completion', position_param, function(err, _, result)
+  vim.lsp.buf_request(params.bufnr, 'textDocument/completion', position_param, function(err, result)

stormc avatar Sep 08 '21 14:09 stormc

@stormc thanks for the workaround, looking forward to the fix 😄

mrkz avatar Sep 29 '21 18:09 mrkz

@mrkz You're welcome, #400 does also proper-fix hover and signature for which you would have to apply this workaround's gist as well, so I suggest to use that instead of this workaround until it's been merged.

stormc avatar Sep 30 '21 07:09 stormc