echasnovski / mini.nvim

Library of 40+ independent Lua modules improving overall Neovim (version 0.8 and higher) experience with minimal effort
MIT License
4.84k stars 183 forks source link

cmdline autocompletion #690

Open deathbeam opened 7 months ago

deathbeam commented 7 months ago

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.

echasnovski commented 7 months ago

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?

deathbeam commented 7 months ago

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

echasnovski commented 7 months ago

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.

deathbeam commented 7 months ago

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.

echasnovski commented 7 months ago

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

Yushi5058 commented 6 months ago

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