hrsh7th / cmp-cmdline

nvim-cmp source for vim's cmdline
MIT License
505 stars 41 forks source link

Feature Request: display current value when command starts with :set <settingname> #32

Closed davidscotson closed 2 years ago

davidscotson commented 2 years ago

Using :set <partialsearch> gives setting names as completion options.

Would it be possible to also add the current value as a 'preview', basically whatever :set name? would tell you.

hrsh7th commented 2 years ago

I think it's already can...? (In my environment, :set virtualedit=| will only show the completion item that virtualedit=all.

davidscotson commented 2 years ago

Once you get to the other side of the = it will autocomplete non-boolean values, but I was thinking something more like this screenshot (from the tridactyl vim-like browser):

Screenshot 2022-02-13 at 21 01 56

Where, after you type set it starts to show you the list of settings that match the text typed so far, but also shows the current value for that setting (it also shows possible setting values or their js type and a help string). I found it helpful to add context to the settings when you're not quite sure what you are looking for, similar to when a file shows a preview.