From 28fe47671dd194508f3d747484331e477efd4c00 Mon Sep 17 00:00:00 2001 From: Ryan Dale <115406+daler@users.noreply.github.com> Date: Thu, 7 May 2026 17:04:01 -0400 Subject: [PATCH 01/12] color terminal cursorline when not in terminal-insert --- .config/nvim/lua/config/autocmds.lua | 41 ++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/.config/nvim/lua/config/autocmds.lua b/.config/nvim/lua/config/autocmds.lua index 036c9d5..eff365f 100644 --- a/.config/nvim/lua/config/autocmds.lua +++ b/.config/nvim/lua/config/autocmds.lua @@ -151,3 +151,44 @@ vim.api.nvim_create_autocmd("QuitPre", { end end, }) + +-- In toggleterm terminal buffers, show a red "cursorline" bar when the +-- terminal is in normal mode. Useful visual reminder so you don't start typing +-- and then wonder why text is not showing up. + +-- Custom highlight group we'll use in a moment +vim.api.nvim_set_hl(0, "TermCursorLine", { bg = "#5f0000" }) + +-- winhighlight lets us render CursorLin higlights with TermCursorLine's +-- attributes, but just local to that window (here, the terminal) +local function apply_term_winhl() + if vim.bo.buftype == "terminal" then + vim.wo.winhighlight = "CursorLine:TermCursorLine" + end +end + +local group = vim.api.nvim_create_augroup("ToggleTermCursorLine", { clear = true }) + +-- Catch new terminals and existing ones +vim.api.nvim_create_autocmd({ "TermOpen", "WinEnter", "BufWinEnter" }, { + group = group, + callback = apply_term_winhl, +}) + +-- Toggle cursorline only inside terminal windows +vim.api.nvim_create_autocmd("ModeChanged", { + group = group, + + -- match "old_mode:new_mode" strings. E.g., t:nt means we just left + -- terminal-insert to go into terminal-normal. + pattern = { "t:nt", "nt:t" }, + callback = function() + -- do nothing if we're not in a terminal buffer + if vim.bo.buftype ~= "terminal" then + return + end + -- set the window-specific (.wo) cursorline to true if we're in + -- terminal-normal mode + vim.wo.cursorline = vim.api.nvim_get_mode().mode == "nt" + end, +}) From 0bb19ab7dddfae8148334514623584951fc4789b Mon Sep 17 00:00:00 2001 From: Ryan Dale <115406+daler@users.noreply.github.com> Date: Thu, 7 May 2026 17:07:52 -0400 Subject: [PATCH 02/12] update changelog --- docs/changelog.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index dc6ef7f..0ac8909 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1,5 +1,12 @@ Changelog ========= +2026-05-07 +---------- + +**vim** + +Color the cursorline in toggleterm terminal when it's not in insert mode. Gives +a visual reminder of when typing won't do what you expect. 2026-01-28 ---------- From 2a45372d60e696d6638d9cf6d9c7eead8cf64297 Mon Sep 17 00:00:00 2001 From: Ryan Dale <115406+daler@users.noreply.github.com> Date: Thu, 7 May 2026 17:48:20 -0400 Subject: [PATCH 03/12] update ubuntu dependencies --- apt-installs-minimal.txt | 2 +- apt-installs.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apt-installs-minimal.txt b/apt-installs-minimal.txt index 2662151..189ebb3 100644 --- a/apt-installs-minimal.txt +++ b/apt-installs-minimal.txt @@ -4,7 +4,7 @@ automake # for compiling tools requiring automake build-essential # gcc and make are in here cmake # for compiling tools requiring cmake liblzma-dev # dev lib for compiling tools needing lzma -libpcre3-dev # for Perl-compatible regexes +libpcre2-dev # for Perl-compatible regexes pkg-config # for using the right compiler options zlib1g-dev # dep lib for compiling tools needing zlib ncurses-dev # for TUI programs diff --git a/apt-installs.txt b/apt-installs.txt index 1d6343a..830fc0f 100644 --- a/apt-installs.txt +++ b/apt-installs.txt @@ -3,7 +3,7 @@ automake # for compiling tools requiring automake build-essential # gcc and make are in here cmake # for compiling tools requiring cmake liblzma-dev # dev lib for compiling tools needing lzma -libpcre3-dev # for Perl-compatible regexes +libpcre2-dev # for Perl-compatible regexes pkg-config # for using the right compiler options zlib1g-dev # dep lib for compiling tools needing zlib From daabb3dc5b5cb1870520160c82a447f74bee396c Mon Sep 17 00:00:00 2001 From: Ryan Dale <115406+daler@users.noreply.github.com> Date: Thu, 7 May 2026 17:48:34 -0400 Subject: [PATCH 04/12] explicitly include pip in conda envs --- setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 568a523..9ae312b 100755 --- a/setup.sh +++ b/setup.sh @@ -674,7 +674,7 @@ elif [ $task == "--install-radian" ]; then set +u # Note: radian needs R installed to compile the rchitect dependency. It # is unclear whether radian is dependent on a particular R version. - conda create -y -n radian python r + conda create -y -n radian python r pip conda activate radian pip install radian ln -sf $CONDA_LOCATION/envs/radian/bin/radian $HOME/opt/bin/radian @@ -779,7 +779,7 @@ elif [ $task == "--install-pyp" ]; then ok "Install pyp (https://github.com/hauntsaninja/pyp) into ~/opt/bin" set +u can_make_conda_env "pyp" - conda create -y -n pyp python + conda create -y -n pyp python pip conda activate pyp pip install pypyp==${PYP_VERSION} ln -sf $(which pyp) $HOME/opt/bin/pyp From a638d1995a483de7ca202fe955ac9d8e003f7262 Mon Sep 17 00:00:00 2001 From: Ryan Dale <115406+daler@users.noreply.github.com> Date: Thu, 7 May 2026 20:55:19 -0400 Subject: [PATCH 05/12] setuptools as dep for vd --- setup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.sh b/setup.sh index 9ae312b..1950c6c 100755 --- a/setup.sh +++ b/setup.sh @@ -634,6 +634,7 @@ elif [ $task == "--install-tmux" ]; then elif [ $task == "--install-vd" ]; then ok "Install visidata (https://visidata.org/) into a new conda env and symlink to ~/opt/bin/vd" install_env_and_symlink visidata visidata="${VISIDATA_VERSION}" vd + conda install -y setuptools -n visidata printf "${YELLOW}Installed to ~/opt/bin/vd${UNSET}\n" check_opt_bin_in_path From 059203a9cad0816d5d003d557aef8921a1577213 Mon Sep 17 00:00:00 2001 From: Ryan Dale <115406+daler@users.noreply.github.com> Date: Thu, 7 May 2026 22:18:26 -0400 Subject: [PATCH 06/12] bumpt tool versions --- setup.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/setup.sh b/setup.sh index 1950c6c..1f5d21d 100755 --- a/setup.sh +++ b/setup.sh @@ -20,19 +20,19 @@ fi set -eo pipefail # Change tool versions here -VISIDATA_VERSION=2.11 +VISIDATA_VERSION=3.3 HUB_VERSION=2.14.2 NVIM_VERSION=0.11.5 -RG_VERSION=13.0.0 -BAT_VERSION=0.19.0 -JQ_VERSION=1.6 +RG_VERSION=15.1.0 +BAT_VERSION=0.26.1 +JQ_VERSION=1.8.1 ICDIFF_VERSION=2.0.4 BFG_VERSION=1.14.0 -FD_VERSION=8.5.3 +FD_VERSION=10.4.2 BLACK_VERSION=22.6.0 PYP_VERSION=1.1.0 -FZF_VERSION=0.48.1 -TMUX_VERSION=3.5 +FZF_VERSION=0.72.0 +TMUX_VERSION=3.6a function showHelp() { From 2cfdc8e1d035006f8cdc32e77078946b2c9ac5a1 Mon Sep 17 00:00:00 2001 From: Ryan Dale <115406+daler@users.noreply.github.com> Date: Thu, 7 May 2026 22:18:39 -0400 Subject: [PATCH 07/12] download() properly exits 1 upon failure (plus msg) --- setup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 1f5d21d..0ef59da 100755 --- a/setup.sh +++ b/setup.sh @@ -304,7 +304,8 @@ download() { echo "Downloading $1 to $2" [[ -e $(dirname $2) ]] || mkdir -p $(dirname $2) if ! (try_curl $1 $2 || try_wget $1 $2); then - echo "Could not download $1" + printf "${RED}Could not download %s${UNSET}\n" "$1" >&2 + return 1 fi } From 62127c2f1ee9d59371c385925d30f08558dd2cae Mon Sep 17 00:00:00 2001 From: Ryan Dale <115406+daler@users.noreply.github.com> Date: Thu, 7 May 2026 22:19:02 -0400 Subject: [PATCH 08/12] fzf changed urls for mac --- setup.sh | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/setup.sh b/setup.sh index 0ef59da..53c3f77 100755 --- a/setup.sh +++ b/setup.sh @@ -574,22 +574,16 @@ elif [ $task == "--install-fzf" ]; then ok "Installs fzf (https://github.com/junegunn/fzf)" mkdir -p /tmp/fzf if [[ $OSTYPE == darwin* ]]; then - URL=https://github.com/junegunn/fzf/releases/download/${FZF_VERSION}/fzf-${FZF_VERSION}-darwin_arm64.zip - download $URL /tmp/fzf/fzf.zip - ( - cd /tmp/fzf - unzip fzf.zip - cp fzf ~/opt/bin - ) + URL=https://github.com/junegunn/fzf/releases/download/v${FZF_VERSION}/fzf-${FZF_VERSION}-darwin_arm64.tar.gz else - URL=https://github.com/junegunn/fzf/releases/download/${FZF_VERSION}/fzf-${FZF_VERSION}-linux_amd64.tar.gz - download $URL /tmp/fzf/fzf.tar.gz - ( - cd /tmp/fzf - tar -xf fzf.tar.gz - cp fzf ~/opt/bin - ) + URL=https://github.com/junegunn/fzf/releases/download/v${FZF_VERSION}/fzf-${FZF_VERSION}-linux_amd64.tar.gz fi + download $URL /tmp/fzf/fzf.tar.gz + ( + cd /tmp/fzf + tar -xf fzf.tar.gz + cp fzf ~/opt/bin + ) rm -r /tmp/fzf if [ ! $(grep -q "(fzf --bash)" ~/.bashrc) ]; then From 2a0599c80049e85a6b75a7f0a27e06be26aad142 Mon Sep 17 00:00:00 2001 From: Ryan Dale <115406+daler@users.noreply.github.com> Date: Thu, 7 May 2026 22:19:56 -0400 Subject: [PATCH 09/12] diff on lockfile only runs if it exists --- setup.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/setup.sh b/setup.sh index 53c3f77..e823701 100755 --- a/setup.sh +++ b/setup.sh @@ -962,11 +962,19 @@ elif [ $task == "--restore-nvim-plugins" ]; then ok "Restore nvim plugins using the lazy-lock.json file in this repo? This will not change any other config." timestamp=$(date +"%Y%m%d%H%M") NVIM_LOCKFILE_BACKUP="$HOME/.config/nvim/lazy-lock_${timestamp}.json" - [ -e $HOME/.config/nvim/lazy-lock.json ] && cp $HOME/.config/nvim/lazy-lock.json "$NVIM_LOCKFILE_BACKUP" - cp .config/nvim/lazy-lock.json $HOME/.config/nvim/lazy-lock.json + if [ -e "$HOME/.config/nvim/lazy-lock.json" ]; then + cp "$HOME/.config/nvim/lazy-lock.json" "$NVIM_LOCKFILE_BACKUP" + else + NVIM_LOCKFILE_BACKUP= + fi + cp .config/nvim/lazy-lock.json "$HOME/.config/nvim/lazy-lock.json" nvim --headless "+Lazy! restore" +qa - printf "${YELLOW}Here is the diff of what changed (new compared to old):\n${UNSET}" - diff -u $NVIM_LOCKFILE_BACKUP ~/.config/nvim/lazy-lock.json + if [ -n "$NVIM_LOCKFILE_BACKUP" ]; then + printf "${YELLOW}Here is the diff of what changed (new compared to old):\n${UNSET}" + diff -u "$NVIM_LOCKFILE_BACKUP" "$HOME/.config/nvim/lazy-lock.json" || true + else + printf "${YELLOW}No existing ~/.config/nvim/lazy-lock.json was found, so no diff is available.\n${UNSET}" + fi printf "${YELLOW}Restored plugins using ~/.config/nvim/lazy-lock.json.\n" printf "Any original file was renamed to $NVIM_LOCKFILE_BACKUP if you " printf "need the previous version, otherwise you can delete it.\n${UNSET}" From 564d340ca75e6833540196d6b1a9920f6cbe77ab Mon Sep 17 00:00:00 2001 From: Ryan Dale <115406+daler@users.noreply.github.com> Date: Thu, 7 May 2026 22:23:18 -0400 Subject: [PATCH 10/12] update changelog --- docs/changelog.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 0ac8909..91d0ffc 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -8,6 +8,13 @@ Changelog Color the cursorline in toggleterm terminal when it's not in insert mode. Gives a visual reminder of when typing won't do what you expect. +**setup** + +- bumped versions of installed tools +- pip explicitly added to built conda envs +- download() properly exits 1 upon failure +- diff on nvim lockfile only runs if it exists + 2026-01-28 ---------- From 7049536b9ba8e3545383fc1d7da13e3c7b795d4a Mon Sep 17 00:00:00 2001 From: Ryan Dale <115406+daler@users.noreply.github.com> Date: Thu, 7 May 2026 22:30:45 -0400 Subject: [PATCH 11/12] update expected test results --- tests/test_commands | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_commands b/tests/test_commands index 4fc3795..bf1e85b 100644 --- a/tests/test_commands +++ b/tests/test_commands @@ -1,7 +1,7 @@ pyp 1+8 9 which mamba /root/dockeruser/miniforge/condabin/mamba black --version | head -n1 black, 22.6.0 (compiled: no) -vd --version saul.pw/VisiData v2.11 -rg --version | grep ripgrep ripgrep 13.0.0 (rev af6b6c543b) -fd --version fd 8.5.3 -fzf --version 0.48.1 (d579e33) +vd --version saul.pw/VisiData 3.3 +rg --version | grep ripgrep ripgrep 5.1.0 (rev af60c2de9d) +fd --version fd 10.4.2 +fzf --version 0.72.0 (6fefe025) From faf9f7894d0d0cde9259808dddd30c3c25219bca Mon Sep 17 00:00:00 2001 From: Ryan Dale <115406+daler@users.noreply.github.com> Date: Thu, 7 May 2026 22:50:23 -0400 Subject: [PATCH 12/12] fix test commands --- tests/test_commands | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_commands b/tests/test_commands index bf1e85b..4a0cf42 100644 --- a/tests/test_commands +++ b/tests/test_commands @@ -1,7 +1,7 @@ pyp 1+8 9 which mamba /root/dockeruser/miniforge/condabin/mamba black --version | head -n1 black, 22.6.0 (compiled: no) -vd --version saul.pw/VisiData 3.3 -rg --version | grep ripgrep ripgrep 5.1.0 (rev af60c2de9d) +vd --version saul.pw/VisiData v3.3 +rg --version | grep ripgrep ripgrep 15.1.0 (rev af60c2de9d) fd --version fd 10.4.2 fzf --version 0.72.0 (6fefe025)