mini.nvim icon indicating copy to clipboard operation
mini.nvim copied to clipboard

cmdline autocompletion

Open deathbeam opened this issue 1 year ago • 8 comments

Contributing guidelines

Module(s)

mini.completion

Description

I recently switched to mini.completion from nvim-cmp and I feel like there must be simpler way to do command line autocomplete that isnt something like wilder. I got fairly close with just autocommands, only issue was wildmenu behaviour that cant rly be changed where it always tries to complete if there is only match (so something like noinsert) is not possible. Could be good thing to look at maybe for mini as it do not sounds like it would require a lot of code.

deathbeam avatar Feb 11 '24 18:02 deathbeam

Thanks for the suggestion!

I did not look into Command line completion, as the built-in default one seems good enough for me.

Would you mind elaborating on which issues are worth solving here?

echasnovski avatar Feb 11 '24 18:02 echasnovski

Well its mostly that it would be nice to have the menu open as you type instead of having to press tab, nothing fancy (see https://github.com/gelguy/wilder.nvim or https://github.com/hrsh7th/cmp-cmdline for nvim-cmp), and example (popping up witout pressing tab):

image

deathbeam avatar Feb 11 '24 18:02 deathbeam

Ah, so basically just make a Command line autocompletion (as the title says :) ). Yeah, sounds interesting. I'll see what can be done when I'll be updating 'mini.completion' in (hopefully) near-ish future.

echasnovski avatar Feb 11 '24 18:02 echasnovski

Alright so I was pretty bored and found this as example and tried to implement it properly here: https://github.com/deathbeam/dotfiles/blob/master/nvim/.config/nvim/lua/config/cmdline-completion.lua .

image

Im not sure if you would be willing to accept this as PR (or if you wanted it merged with mini.completion) but I would be happy to PR it if you do.

deathbeam avatar Feb 12 '24 18:02 deathbeam

Huge thanks for the suggestion and enthusiasm!

At the moment I would like to take time to think about the best approach here. Whether it should be added in 'mini.completion' or separate module (or even at all, really).

echasnovski avatar Feb 12 '24 19:02 echasnovski

Sounds like a good feature, I'm waiting for updates !!

Yushi5058 avatar Feb 18 '24 13:02 Yushi5058

If it doesn't add too many lines to make mini.completion no longer "mini", it would be great to have one extension that could replace three CMP plugins (cmp/cmp-cmdline/cmp-buffer) .

GNOMES avatar Oct 08 '24 16:10 GNOMES

Indeed, my main course of action here is to see if it can be included in 'mini.completion'.

echasnovski avatar Oct 08 '24 16:10 echasnovski