From 5ff5aa3bf3be42909665821c0c868608e24b865d Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Tue, 18 Jun 2024 08:20:39 -0500 Subject: [PATCH 1/2] vims: update --- outerheaven.init3.home/.config/nvim/init.vim | 6 ++---- outerheaven.init3.home/.vimrc | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/outerheaven.init3.home/.config/nvim/init.vim b/outerheaven.init3.home/.config/nvim/init.vim index 3e33676..9c0ccb6 100644 --- a/outerheaven.init3.home/.config/nvim/init.vim +++ b/outerheaven.init3.home/.config/nvim/init.vim @@ -1,8 +1,6 @@ set mouse= -" use spaces instead of \t -set expandtab -" match indentation of previous line -set autoindent +set expandtab " use spaces instead of \t +set autoindent " match indentation of previous line set runtimepath^=~/.vim runtimepath+=~/.vim/after let &packpath = &runtimepath source ~/.vimrc diff --git a/outerheaven.init3.home/.vimrc b/outerheaven.init3.home/.vimrc index b490349..d5ebbac 100644 --- a/outerheaven.init3.home/.vimrc +++ b/outerheaven.init3.home/.vimrc @@ -1,4 +1,5 @@ -" NOTE: don't add more LSPs here, use coc - it offers better completion +" NOTE: don't add more LSPs here, use 'coc.nvim' - it offers better completion +" 'vim'/common elements are held here while 'nvim' has another config: '.config/nvim/init.vim' call plug#begin('~/.vim/exts') Plug 'AlexvZyl/nordic.nvim', { 'branch': 'main' } Plug 'neoclide/coc.nvim', {'branch': 'release'} From 0e4af5d5962ed4aa532f45ae6dbbdd1c5c012407 Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Tue, 18 Jun 2024 08:28:13 -0500 Subject: [PATCH 2/2] update: robustness, include Sway --- update.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/update.sh b/update.sh index c0f37cb..1f33e97 100755 --- a/update.sh +++ b/update.sh @@ -3,13 +3,15 @@ # minimal dotfile manager # tracks files / copies them into the repo, sorted by hostname # +set -u # array of files [relative to home] to include DOTS=( '.vimrc' '.config/nvim/init.vim' '.config/nvim/coc-settings.json' - # '.config/sway' + '.config/autostart-i3ipc.yml' + '.config/sway' ) # ensure the host running this script/updating dotfiles has a directory @@ -18,13 +20,16 @@ DOTS=( [ -d "$HOSTNAME" ] || mkdir -v "$HOSTNAME" pushd "$HOSTNAME" || exit +echo "Changed working dir to $PWD" + # now that the host/working dir is managed, process the dotfiles # ensure their directory structure is retained, then recursively copy for DOT in "${DOTS[@]}"; do DOT_DIR="$(dirname "$DOT")" [ -d "$DOT_DIR" ] || mkdir -vp "$DOT_DIR" - # naively copy; rely on git to tell us about changes - cp -ravp "$HOME/$DOT" "$DOT" + # naively 'copy' with rsync; rely on git to tell us about changes. TODO: reconsider + echo "Copying '$HOME/$DOT' to '$DOT'" + rsync -aqv "$HOME/$DOT" "$DOT" || echo "Couldn't copy '$DOT', got rc: $?" done # return where we were