diff --git a/.config/nix/packages.nix b/.config/nix/packages.nix index 04544c3..598547d 100644 --- a/.config/nix/packages.nix +++ b/.config/nix/packages.nix @@ -15,7 +15,6 @@ with import {}; [ jq less macchina - neovim nix ripgrep tldr diff --git a/.config/nvim/.gitignore b/.config/nvim/.gitignore deleted file mode 100644 index a0e76af..0000000 --- a/.config/nvim/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.netrwhist diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim deleted file mode 100644 index de5f274..0000000 --- a/.config/nvim/init.vim +++ /dev/null @@ -1,83 +0,0 @@ -" use Vim mode instead of pure Vi, must be the first instruction -" wrapped in conditional to avoid side effects when already set -if &compatible - set nocompatible -endif - -" configure plugins using vim-plug -" https://github.com/junegunn/vim-plug -call plug#begin('~/.cache/nvim/plugged') - -" helpers -Plug 'farmergreg/vim-lastplace' " intelligently reopen files at last edit position -Plug 'junegunn/fzf' " fuzzy finder -Plug 'junegunn/fzf.vim' " fuzzy finder for vim -Plug 'ntpeters/vim-better-whitespace' " highlight trailing whitespace, :StripWhitespace to remove -Plug 'PeterRincker/vim-searchlight' " highlight current search match differently -Plug 'tpope/vim-sensible' " defaults everyone can agree on -Plug 'tpope/vim-sleuth' " heuristically set buffer options -Plug 'vim-airline/vim-airline' " fancy statusline - -" languages -Plug 'blankname/vim-fish' " fish -Plug 'rust-lang/rust.vim' " rust -Plug 'udalov/kotlin-vim' " kotlin -Plug 'ziglang/zig.vim' " zig - -call plug#end() - -" Quickly edit/reload this configuration file -" To return to previous file, type ':edit #' -nnoremap gev :edit $MYVIMRC -nnoremap gsv :source $MYVIMRC - -" hide line numbers at startup, toggle with F2 -set nonumber norelativenumber -nnoremap :set number! relativenumber! - -" highlight the cursor line, toggle with F3 -nnoremap :set cursorline! - -" show the effects of a command incrementally, as you type -set inccommand=nosplit - -" clear highlighting with escape key -nnoremap :noh - -" fzf settings -let g:fzf_command_prefix = 'Fzf' -let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } } -nmap (fzf-maps-n) -xmap (fzf-maps-x) -omap (fzf-maps-o) -nnoremap :FzfFiles -nnoremap fc :FzfCommits -nnoremap ff :FzfFiles -nnoremap fh :FzfHistory -nnoremap fr :FzfRg - -" disable match highlighting -let g:loaded_matchparen=1 - -" write settings -set confirm " confirm :q in case of unsaved changes - -" clipboard settings -set clipboard=unnamedplus " enable copy/paste/yank to and from Vim/Neovim - -" disable cursor-styling -" https://github.com/neovim/neovim/wiki/FAQ#how-to-change-cursor-shape-in-the-terminal -set guicursor= -autocmd OptionSet guicursor noautocmd set guicursor= - -" paste settings (in Neovim, use plain insert mode) -if !has('nvim') - set pastetoggle= -endif - -" disable mouse support -" https://github.com/neovim/neovim/pull/19290 -set mouse= - -" associate Jenkinsfile with groovy syntax -autocmd BufNewFile,BufRead Jenkinsfile set filetype=groovy diff --git a/README.md b/README.md index f452859..f6691cd 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,18 @@ -## Config files +### Tools -| Tool | Description | -| -------- | ----------- | -| Homebrew | Package management (Mac) | -| Nix | Package management (Linux) | -| Fish | Shell | -| Git | Version control | -| Neovim | Editor | +* [Homebrew](https://brew.sh/) (macOS) +* [Nix](https://nixos.org) (Linux) +* [Fish](https://fishshell.com/) +* [Helix](https://helix-editor.com/) ### Usage -Run the interactive installer for Mac/Linux: `./install.sh` - -Keep pressing `Enter` to accept every prompt in order. +Run the interactive installer: `./install.sh` ``` > ./install.sh -Install package mananger? [Y/n] -Install packages? [Y/n] -Set login shell? [Y/n] -Create symlinks? [Y/n] -Install vim plugins? [Y/n] +Install package manager [Y/n] +Install packages [Y/n] +Install symlinks [Y/n] +Install login shell [Y/n] ``` - -Backups are created for existing files that get replaced. diff --git a/install.sh b/install.sh index 8f1c55c..a2b865b 100755 --- a/install.sh +++ b/install.sh @@ -18,14 +18,13 @@ confirm() { # Install tools if [[ "$OSTYPE" == linux-gnu* ]]; then - confirm "Install Nix?" && "$ROOTDIR/install/install-nix.sh" - confirm "Install Nix packages?" && "$ROOTDIR/install/install-nix-packages.sh" + confirm "Install Nix" && "$ROOTDIR/install/install-nix.sh" + confirm "Install Nix packages" && "$ROOTDIR/install/install-nix-packages.sh" elif [[ "$OSTYPE" == darwin* ]]; then - confirm "Install Homebrew?" && "$ROOTDIR/install/install-brew.sh" - confirm "Install Homebrew packages?" && "$ROOTDIR/install/install-brew-packages.sh" + confirm "Install Homebrew" && "$ROOTDIR/install/install-brew.sh" + confirm "Install Homebrew packages" && "$ROOTDIR/install/install-brew-packages.sh" fi # Extra steps -confirm "Set login shell?" && "$ROOTDIR/install/install-shell.sh" -confirm "Create symlinks?" && "$ROOTDIR/install/install-symlinks.sh" -confirm "Install vim plugins?" && "$ROOTDIR/install/install-vim-plugins.sh" +confirm "Install symlinks" && "$ROOTDIR/install/install-symlinks.sh" +confirm "Install login shell" && "$ROOTDIR/install/install-shell.sh" diff --git a/install/install-brew-packages.sh b/install/install-brew-packages.sh index 22a66f8..aef9220 100755 --- a/install/install-brew-packages.sh +++ b/install/install-brew-packages.sh @@ -16,7 +16,6 @@ brew install \ helix \ less \ macchina \ - neovim \ ripgrep \ tree \ zoxide diff --git a/install/install-vim-plugins.sh b/install/install-vim-plugins.sh deleted file mode 100755 index 4e89277..0000000 --- a/install/install-vim-plugins.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -echo "***** INSTALL VIM PLUGINS *****" - -if [ -x "/usr/local/bin/nvim" ]; then - VIM_PATH="/usr/local/bin/nvim" -elif [ -x "$HOME/.nix-profile/bin/nvim" ]; then - VIM_PATH="$HOME/.nix-profile/bin/nvim" -else - echo "Cannot find vim! Tried the following paths:" - echo " - /usr/local/bin/nvim" - echo " - $HOME/.nix-profile/bin/nvim" - exit 1 -fi - -VIM_PLUG="$HOME/.local/share/nvim/site/autoload/plug.vim" - -if [ -f "$VIM_PLUG" ]; then - echo "Updating vim plugin manager..." - echo "Updating vim plugins..." - $VIM_PATH --headless +PlugUpgrade +PlugUpdate +qall -else - echo "Installing vim plugin manager..." - curl -fsSL -o "$VIM_PLUG" --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim - echo "Installing vim plugins..." - $VIM_PATH --headless +PlugInstall +qall -fi - -echo