Skip to content
This repository was archived by the owner on Oct 13, 2021. It is now read-only.

Upstream nvim at 23fe6dba1 breaks tab completion #399

Open
arsham opened this issue Sep 6, 2021 · 3 comments
Open

Upstream nvim at 23fe6dba1 breaks tab completion #399

arsham opened this issue Sep 6, 2021 · 3 comments

Comments

@arsham
Copy link

arsham commented Sep 6, 2021

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.

@stormc
Copy link

stormc commented Sep 8, 2021

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)

@mrkz
Copy link

mrkz commented Sep 29, 2021

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

@stormc
Copy link

stormc commented Sep 30, 2021

@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.

@Shougo Shougo mentioned this issue Oct 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants