ms-jpq / coq_nvim

Fast as FUCK nvim completion. SQLite, concurrent scheduler, hundreds of hours of optimization.
GNU General Public License v3.0
3.54k stars 100 forks source link

Insert completion without <CR> #318

Closed DerWeh closed 3 years ago

DerWeh commented 3 years ago

Recently I wanted to switch to the built-in language server and your completion framework has really great features, thanks a lot.

Should having to always have to hit <CR> after a tab completion really annoys me. I would prefer to have the standard behavior of vim, where selection of an entry from the completion list of vim via <C-n> inserts the text automatically.

I found the option to coq_settings.display.ghost_text.enabled to get rid of the ghost text, but nothing to insert the real text. Is there an option to do this?

zeertzjq commented 3 years ago

Duplicate of #90.

Also you don't have to press <CR>. You can also just press the next character you want to type after the completion.

DerWeh commented 3 years ago

I see, the issue with just typing on seems to be a plug-in conflict. Using lexima to auto-close parenthesis results in

end_col out of bounds
EditInstruction(primary=True, begin=(406, 0), end=(406, 4), cursor_yoffset=0, cursor_xpos=10, new_lines=['solve_root'])
start_col out of bounds

Without the plug-in, it indeed is not necessary to hit <CR>. Do you know a plug-in like lexima that works with coq_nvim?

Another plug-in that is sadly not working together with coq_nvim is echodoc.vim. This is definitely functionality I wouldn't want to miss, as I am very forgetful. Do you have hints on this, or should I open a separate issue? echodoc listens for the autocmd_event 'CompleteDone' (or whatever you set). What events does coq_nvim throw?

zeertzjq commented 3 years ago

nvim-autopairs is an autopair plugin, but I guess lexima has some other features?

As for echodoc, you may be interested in lsp_signature.nvim. It has some bugs though, and doesn't support showing on cursor movement. It also only works with LSP.

DerWeh commented 3 years ago

lexima was just the first plug-in with dot-repeat I found. As long as it works I am happy, nothing really fancy needed.

Thanks for lsp_signature, looks good so far.

ms-jpq commented 3 years ago

as discussed in #90

I don't think this is possible right now? Not without disable fuzzy completion anyways, which is too big a price to pay.

will just close this as it's a dup