begin rebuild of config to separate files

This commit is contained in:
2026-10-21 13:00:09 -04:00
parent 560a493191
commit 05ce9a1b24
40 changed files with 1096 additions and 1788 deletions
+50
View File
@@ -0,0 +1,50 @@
#!/usr/bin/env bash
# Reports what this machine has and what the config will do with it. Changes nothing.
# Usage: scripts/doctor.sh
have() { command -v "$1" >/dev/null 2>&1; }
ok() { printf ' \033[32m✓\033[0m %s\n' "$1"; }
warn() { printf ' \033[33m!\033[0m %s\n' "$1"; }
bad() { printf ' \033[31m✗\033[0m %s\n' "$1"; }
echo "Neovim"
if have nvim; then
version="$(nvim --version | head -1)"
read -r major minor < <(echo "$version" | sed -E 's/^NVIM v([0-9]+)\.([0-9]+).*/\1 \2/')
if [ "$major" -gt 0 ] || [ "$minor" -ge 11 ]; then
ok "$version"
else
bad "$version is too old, need >= 0.11 (run scripts/install-nvim.sh)"
fi
else
bad "nvim not found (run scripts/install-nvim.sh)"
fi
echo "Required"
have git && ok git || bad "git (plugins are cloned with it)"
{ have curl || have wget; } && ok "curl/wget" || bad "curl or wget (mason, blink.cmp and treesitter download with it)"
{ have cc || have gcc || have clang; } && ok "C compiler" || bad "C compiler (treesitter parsers are built locally): apt install build-essential"
have unzip && ok unzip || warn "unzip (mason needs it for some packages)"
have tar && have gzip && ok "tar/gzip" || bad "tar and gzip (mason)"
have rg && ok ripgrep || warn "ripgrep (telescope live grep): apt install ripgrep"
echo "Optional (the config skips what it can't use)"
have make && ok "make (telescope-fzf-native)" || warn "make: telescope falls back to its slower Lua sorter"
have fd && ok fd || warn "fd: telescope find_files falls back to find/ripgrep"
have java && ok "java (jdtls enabled)" || warn "java: Java LSP stays off"
have python3 && ok "python3 (basedpyright, ruff, clang-format enabled)" || warn "python3: Python LSP and clang-format stay off"
have npm && ok "npm (bash-language-server enabled)" || warn "npm: bash LSP stays off"
have latexmk && ok "latexmk (vimtex enabled)" || warn "latexmk: vimtex stays off"
have tree-sitter && ok "tree-sitter CLI" || warn "tree-sitter CLI: mason installs it on first launch"
echo "Session"
if [ -n "${SSH_TTY:-}${SSH_CONNECTION:-}" ]; then
ok "SSH session: clipboard copies via OSC 52 (tmux needs: set -g set-clipboard on)"
elif have pbcopy || have wl-copy || have xclip || have xsel || have win32yank.exe; then
ok "native clipboard tool found"
else
warn "no clipboard tool: clipboard falls back to OSC 52"
fi
[ -n "${NVIM_MINIMAL:-}" ] && warn "NVIM_MINIMAL set: no auto-installs"
[ -n "${NVIM_NO_NERD_FONT:-}" ] && warn "NVIM_NO_NERD_FONT set: plain-text icons"
exit 0