12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- #!/usr/bin/env bash
- add_plugin() {
- owner=$1
- repo=$2
- branch=${3:-HEAD}
- dont_build=${4:-true}
- echo "Updating $owner/$repo" >&2
- revision=$(git ls-remote "https://github.com/$owner/$repo" "$branch" | cut -b -40)
- sha256=$(nix-prefetch-url --unpack "https://github.com/$owner/$repo/archive/$revision.tar.gz")
- cat <<EOF
- (stdenv.mkDerivation {
- name = "$repo";
- src = fetchFromGitHub {
- owner = "$owner";
- repo = "$repo";
- rev = "$revision";
- sha256 = "$sha256";
- };
- dontBuild = $dont_build;
- installPhase = ''
- cp -r . \$out
- '';
- })
- EOF
- }
- echo "{ stdenv, fetchFromGitHub }:
- ["
- add_plugin tpope vim-sensible
- add_plugin tpope vim-sleuth
- add_plugin tpope vim-fugitive
- add_plugin tpope vim-rhubarb
- add_plugin tpope vim-surround
- add_plugin tpope vim-abolish
- add_plugin mbbill undotree
- add_plugin nvim-telescope telescope.nvim
- add_plugin nvim-telescope telescope-fzf-native.nvim HEAD false
- add_plugin nvim-lua plenary.nvim
- add_plugin echasnovski mini.nvim
- add_plugin lewis6991 gitsigns.nvim
- add_plugin neovim nvim-lspconfig
- add_plugin nvim-treesitter nvim-treesitter-textobjects
- add_plugin jose-elias-alvarez typescript.nvim
- add_plugin jose-elias-alvarez null-ls.nvim
- add_plugin j-hui fidget.nvim
- add_plugin sainnhe sonokai
- echo "]"
|