Created
September 10, 2023 03:29
-
-
Save phrmendes/4ded5ff7fb59c22b11f91759023306f5 to your computer and use it in GitHub Desktop.
Download neovim plugins from GitHub using Nix and home-manager
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
pkgs, | |
lib, | |
... | |
}: let | |
fromGitHub = ref: repo: | |
pkgs.vimUtils.buildVimPluginFrom2Nix { | |
pname = "${lib.strings.sanitizeDerivationName repo}"; | |
version = ref; | |
src = builtins.fetchGit { | |
inherit ref; | |
url = "https://github.com/${repo}.git"; | |
}; | |
}; | |
in { | |
programs.neovim = { | |
enable = true; | |
package = pkgs.neovim-unwrapped; | |
vimAlias = true; | |
vimdiffAlias = true; | |
withNodeJs = true; | |
withPython3 = true; | |
plugins = with pkgs.vimPlugins; [ | |
(fromGitHub "HEAD" "user/repo") | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment