update.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/usr/bin/env bash
  2. add_plugin() {
  3. owner=$1
  4. repo=$2
  5. branch=${3:-HEAD}
  6. dont_build=${4:-true}
  7. echo "Updating $owner/$repo" >&2
  8. revision=$(git ls-remote "https://github.com/$owner/$repo" "$branch" | cut -b -40)
  9. sha256=$(nix-prefetch-url --unpack "https://github.com/$owner/$repo/archive/$revision.tar.gz")
  10. cat <<EOF
  11. (buildNeovimPlugin {
  12. name = "$repo";
  13. src = fetchFromGitHub {
  14. owner = "$owner";
  15. repo = "$repo";
  16. rev = "$revision";
  17. sha256 = "$sha256";
  18. };
  19. dontBuild = $dont_build;
  20. })
  21. EOF
  22. }
  23. echo "{ buildNeovimPlugin, fetchFromGitHub }:
  24. ["
  25. add_plugin tpope vim-sleuth
  26. add_plugin tpope vim-fugitive
  27. add_plugin tpope vim-rhubarb
  28. add_plugin tpope vim-abolish
  29. add_plugin mbbill undotree
  30. add_plugin Wansmer treesj
  31. add_plugin nvim-telescope telescope.nvim
  32. add_plugin nvim-telescope telescope-fzf-native.nvim HEAD false
  33. add_plugin nvim-lua plenary.nvim
  34. add_plugin echasnovski mini.nvim
  35. add_plugin lewis6991 gitsigns.nvim
  36. add_plugin neovim nvim-lspconfig
  37. add_plugin nvim-treesitter nvim-treesitter-textobjects
  38. add_plugin jose-elias-alvarez typescript.nvim
  39. add_plugin jose-elias-alvarez null-ls.nvim
  40. add_plugin j-hui fidget.nvim
  41. add_plugin sainnhe sonokai
  42. # still useful for commentstring + indentation
  43. add_plugin LnL7 vim-nix
  44. echo "]"