How to make the `:bd ` buffer completion show the buffer number alongside its name?
For example, I type in command mode:
And this is what I get.
How to make it show a number AND buffer name from :ls command?
for example, init.lua has number 3. Sow in buffer completion it would looked like
3 init.lua
This idea may break something, I just don't know. Is it easy to implement -- or stuff is already hard-coded so it will be bad idea. Any help or information are welcome.
This source is not responsible for completing buffer names, rather, it completes words found inside the buffers. What you are getting in cmdline is actually coming from Vim itself, try it for yourself: run nvim -u NORC, open a few files, enter :bd and press <Tab> -- the buffers will be listed by name, not by bufnr. Showing those in an autocomplete menu is the responsibility of https://github.com/hrsh7th/cmp-cmdline, but under the hood it just asks Neovim for completion results, and those are, unfortunately, hard-coded in the source code of the editor.