vimPlugins: Remove the nvim-cmp dependency on cmp-sources#358809
vimPlugins: Remove the nvim-cmp dependency on cmp-sources#358809khaneliman merged 1 commit intoNixOS:masterfrom
Conversation
|
Looks like it just needs formatting @traxys |
|
The `blink.cmp` neovim plugin provides a shim to use sources initially developped for `nvim-cmp` by using the `blink.compat` plugin. This plugin implements a `cmp` lua module, so that `nvim-cmp` sources register with `blink.cmp` instead of registering with `nvim-cmp`. If we have a hard dependency on nvim-cmp for cmp sources this means we can't use them with `blink.cmp` This also means that we can't easily require the plugin in the check phase, as we would need to add nvim-cmp (or blink.compat) to provide the 'cmp' lua module.
PerchunPak
left a comment
There was a problem hiding this comment.
If someone uses cmp plugin, I would assume they have already installed and configured cmp itself. Though, we should prevent adding nvim-cmp to dependencies somehow for the future.
Not sure how to do that :/ |
I wouldn't worry about it here. I can add them as notes in #352277 when I flag them to not be checked because it will fail the automatic check. |
|
Also, it would create problems for #352277. Maybe count this as edge-case, for which you have to use an overlay? It feels counter-intuitive to remove cmp from dependencies for plugins that were initially created for cmp, because of some another plugin that also implements cmp module. The overlay would be something like this: final: prev:
{
vimPlugins = prev.vimPlugins // {
nvim-cmp = final.vimPlugins.blink-compat;
};
} |
It would just be a note about why we have to ignore it, I already thought about it for another plugin that has a requirement for |
That could be an OK workaround |
|
|
Going to merge so we can handle testing these differently outside of build checks. Should probably just create test cases where we provide nvim-cmp and blink-compat to verify they work. |
The
blink.cmpneovim plugin provides a shim to use sources initially developped fornvim-cmpby using theblink.compatplugin.This plugin implements a
cmplua module, so thatnvim-cmpsources register withblink.cmpinstead of registering withnvim-cmp.If we have a hard dependency on nvim-cmp for cmp sources this means we can't use them with
blink.cmpThis also means that we can't easily require the plugin in the check phase, as we would need to add nvim-cmp (or blink.compat) to provide the 'cmp' lua module.
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.