add lazygit install script

This commit is contained in:
gameloader 2023-06-29 13:51:41 +08:00
parent efe22b134a
commit 625acf4080
2 changed files with 8 additions and 4 deletions

View File

@ -16,16 +16,20 @@ fi
# Install packages # Install packages
if [[ "$OS" == "macos" ]]; then if [[ "$OS" == "macos" ]]; then
brew install unzip wget curl gzip tar ruby go node python git cargo npm fzf brew install unzip wget curl gzip tar ruby go node python git cargo npm fzf lazygit
elif [[ "$OS" == "debian" ]] || [[ "$OS" == "ubuntu" ]]; then elif [[ "$OS" == "debian" ]] || [[ "$OS" == "ubuntu" ]]; then
sudo add-apt-repository ppa:neovim-ppa/unstable sudo add-apt-repository ppa:neovim-ppa/unstable
sudo apt-get update sudo apt-get update
sudo apt-get install -y unzip wget curl gzip tar ruby git cargo npm xclip fzf sudo apt-get install -y unzip wget curl gzip tar ruby git cargo npm xclip fzf
sudo apt-get install -y python3 python3-venv python3-pip nodejs neovim sudo apt-get install -y python3 python3-venv python3-pip nodejs neovim
LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')
curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
tar xf lazygit.tar.gz lazygit
sudo install lazygit /usr/local/bin
elif [[ "$OS" == "manjaro" ]]; then elif [[ "$OS" == "manjaro" ]]; then
sudo pacman -Syu --noconfirm sudo pacman -Syu --noconfirm
sudo pacman -S --noconfirm unzip wget curl gzip tar ruby git cargo npm sudo pacman -S --noconfirm unzip wget curl gzip tar ruby git cargo npm
sudo pacman -S --noconfirm python python-pip fzf sudo pacman -S --noconfirm python python-pip fzf lazygit
sudo pacman -S --noconfirm go nodejs neovim sudo pacman -S --noconfirm go nodejs neovim
fi fi

View File

@ -15,7 +15,7 @@
| hrsh7th/cmp-path | 补全路径 | | hrsh7th/cmp-path | 补全路径 |
| hrsh7th/cmp-buffer | 缓冲区内重复单词补全 | | hrsh7th/cmp-buffer | 缓冲区内重复单词补全 |
| hrsh7th/cmp-nvim-lsp | 补全与lsp的集成 | | hrsh7th/cmp-nvim-lsp | 补全与lsp的集成 |
| kyazdani42/nvim-tree.lua | 文件查看器,不用多说 | | kyazdani42/neo-tree.lua | 文件查看器,不用多说,neo-tree的兼容性更好 |
| numToStr/Comment.nvim | 强大的注释插件 | | numToStr/Comment.nvim | 强大的注释插件 |
| windwp/nvim-autopairs | 括号自动补全 | | windwp/nvim-autopairs | 括号自动补全 |
| ahmedkhalf/project.nvim | 出色的项目管理工具,可与telescope集成 | | ahmedkhalf/project.nvim | 出色的项目管理工具,可与telescope集成 |
@ -44,7 +44,7 @@
| \<leader>s | 保存当前文件 | | \<leader>s | 保存当前文件 |
| \<leader>S | 保存所有文件 | | \<leader>S | 保存所有文件 |
| \<leader><tab> | 切换回上一个buffer,用于两buffer间来回切换 | | \<leader><tab> | 切换回上一个buffer,用于两buffer间来回切换 |
| \<leader>j | 快速进行行跳转 | | \<leader>j | 快速进行行跳转 |
| , | 运行当前文件代码,需要自行配置各种语言 | | , | 运行当前文件代码,需要自行配置各种语言 |
| Ctrl-\\ | 打开终端 | | Ctrl-\\ | 打开终端 |