is there a way to add a custom plugin not packaged in nixpkgs? #592
-
i want to add a plugin by giving its github url. i could do this by using |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
Here an exemple in my config (it's a flake) {
... # inputs
# plugins
inputs.nvim-window-picker-src = {
url = "github:s1n7ax/nvim-window-picker";
flake = false;
};
outputs = {
self,
nixpkgs,
nixvim,
flake-utils,
nvim-window-picker-src
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages."${system}";
nvim = nixvim.legacyPackages."${system}".makeNixvim {
... # config here
extraPlugins = [
(pkgs.vimUtils.buildVimPlugin {
name = "nvim-window-picker";
src = nvim-window-picker-src;
})
];
};
in {
...
});
} |
Beta Was this translation helpful? Give feedback.
-
is there a way to use this approach when using |
Beta Was this translation helpful? Give feedback.
-
You can also very easily upstream a vim package. |
Beta Was this translation helpful? Give feedback.
-
I am marking this discussion as solved :) |
Beta Was this translation helpful? Give feedback.
right, I'm using flakes as well but my call to
makeNixvimWithModule
uses a module file that won't have a reference to the flakeinputs
directly, justpkgs
. This is howmakeNixvimWithModule
is written, so I think there is no way around it without overlays. But I wanted to double check my assumptions in case there's an alternative.To make things more clear, here's my basic setup. A top-level flake: