#!/bin/bash set -eux set -o pipefail ./install-package --deb-packages cargo cargo install tree-sitter-cli # ./install-package --deb-packages 'xclip wl-clipboard' --brew-packages 'pbcopy pbpaste' ./install-package --deb-packages 'xclip wl-clipboard' ./install-package --deb-packages ripgrep --brew-packages ripgrep ./install-package --deb-packages nodejs --brew-packages nodejs # Cleanup/create some backup hierarchies for directory in ~/.config/nvim ~/.local/share/nvim ~/.local/state/nvim ~/cache/nvim do if [ -d "$directory".bak ] then rm -rf "$directory".bak fi if [ -d "$directory" ] then mv "$directory"{,.bak} fi done # This didn't work... # sudo add-apt-repository ppa:lazygit-team/daily # ...so: # This works fine on Linux, but on MacOS grep doesn't have a -P option. Also, I haven't been using lazygit anyway. if ! [ -f /usr/local/bin/lazygit ] then set -x # LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*') LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*') LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | \ grep '"tag_name"' | \ sed 's/"//g' | \ awk ' { print $2 }' | \ sed -e 's/^v//' -e 's/,$//' ) 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 rm -rf lazygit lazygit.tar.gz set +x fi # Actually install AstroNvim :) git clone --depth 1 https://github.com/AstroNvim/template ~/.config/nvim # remove template's git connection to set up your own later rm -rf ~/.config/nvim/.git # https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md # sourcery might be interesting as a way of refactoring Python code. mkdir -p ~/.config/ruff cp lib/pyproject.toml ~/.config/ruff/pyproject.toml cp lib/scripts.vim ~/.config/nvim/scripts.vim # nvim '+LspInstall bashls' '+q' # Maybe biome would be better? https://biomejs.dev/ # Or svelte? # Or tsserver? # nvim '+LspInstall eslint' '+q' # nvim '+LspInstall jsonls' '+q' # nvim '+LspInstall yamlls' '+q' # For Markdown. # nvim '+LspInstall marksman' '+q' # nvim '+LspInstall nginx_language_server' '+q' # nvim '+LspInstall sqlls' '+q' # nvim '+LspInstall lua_ls' '+q' d=~/.config/nvim/lua/plugins/. cp my_ac.lua "$d" cp my_config.lua "$d" cp my_lsp.lua "$d" cp my_mason.lua "$d" cp my_mru.lua "$d" cp my_options.lua "$d" cp my_trouble.lua "$d"