nvim-cmp
nvim-cmp copied to clipboard
Feature request: monolithic repo
FAQ
- [X] I have checked the FAQ and it didn't resolve my problem.
Issues
- [X] I have checked existing issues and there are no open or closed issues with the same problem.
Neovim Version
Latest, built from source
Minimal reproducible full config
N/A
Description
I am working on a Neovim core bug. I noticed that when I run a DEBUG
build of Neovim, when I quit Neovim, I get a return code of 1
(signaling an error). I bisected my init.lua
and found that the problem was with nvim-cmp
.
I peg my plugins to specific commits to avoid random regressions when plugins update, so my installed nvim-cmp
was an old version. I tried bumping nvim-cmp
to the latest commit (using an init.lua
with nothing in it except for nvim-cmp
), and that resolved the problem.
However, when I added back the rest of my plugins, the problem came back, so it seems that the issue was with a combination of several nvim-cmp
-related plugins.
I could keep digging, but this seems really like too much work for a small bug.
My request is, I think it would make a lot of sense for you to combine the several repositories that are required to make nvim-cmp
work into one big repository. Even your minimum working example vimrc
file includes several plugins, because nvim-cmp
doesn't really work by itself. So the modularity you get from having several repos is somewhat an illusion.
Having plugins with a lot of cross-dependencies makes it hard to isolate, report, and reproduce bugs. As a user, if I encounter a bug with autocompletion, how am I supposed to know which of these is causing the problem? (This is the list from your MWE vimrc
, so I am treating it as a "minimum install" of nvim-cmp
.)
Plug 'hrsh7th/nvim-cmp'
Plug 'hrsh7th/cmp-buffer'
Plug 'hrsh7th/cmp-nvim-lsp'
Plug 'hrsh7th/vim-vsnip'
Plug 'neovim/nvim-lspconfig'
Having a lot of plugin cross-deps also makes installation more complicated from the user's perspective. It is too much work to understand what all of those plugins are responsible for, so I just copy-paste the Plug
lines into my vimrc
, which is not ideal.
I think nvim-cmp
is great, and I would love to one day see its functionality merged into core, so that language-specific IDE plugins that want to provide completion don't have to have a dependency on another plugin, and can instead just depend on core. I think simplifying the dependency structure is usually really valuable, where it's possible. I know this issue is a big request and I don't expect you to just do it, I am just hoping to raise some points to consider as you continue developing the Neovim autocompletion ecosystem.
Steps to reproduce
N/A
Expected behavior
N/A
Actual behavior
N/A
Additional context
No response
I can understand your request.
However, in my experience developing a plugin called nvim-compe, I'm afraid that allowing the built-in sources even once will result in all other sources being included.
It isn't easy to attach/detach the completion sources in a general IDE. For example, some IDEs may not be able to turn off file system completion or buffer completion.
The nvim-cmp is developed by prioritizing "fully customizable" over "providing comfortable defaults". (I think that's the value of vim / neovim.)
I can imagine and understand that some people disagree with this opinion. I would like to hear the opinions of various people about this.
Also, I've been really busy lately and think it would be great if the neovim community could pick up and maintain this plugin. (Although I haven't taken any concrete action yet)
google translated
I think monolithic repo make worse for bisecting problem. Because you cannot disable specific plugins.
If you only use one very very big plugin repository, can you research the plugin problems? I cannot.
If the plugins are splitted like nvim-cmp, you can start the research by minimal plugins.
Having a lot of plugin cross-deps also makes installation more complicated from the user's perspective. It is too much work to understand what all of those plugins are responsible for, so I just copy-paste the Plug lines into my vimrc, which is not ideal.
I know it is complex and hard to configure. But I think users should know the dependencies.