From ae8c78d09683613f83634dc6379bee80f7aa649c Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 16:40:25 -0500 Subject: [PATCH 01/50] nvim: Bootstrap empty config --- stowdir/.config/nvim/init.lua | 28 ++ stowdir/.config/nvim/lazy-lock.json | 3 + stowdir/.config/nvim/nvim-features.md | 508 ++++++++++++++++++++++++++ 3 files changed, 539 insertions(+) create mode 100644 stowdir/.config/nvim/init.lua create mode 100644 stowdir/.config/nvim/lazy-lock.json create mode 100644 stowdir/.config/nvim/nvim-features.md diff --git a/stowdir/.config/nvim/init.lua b/stowdir/.config/nvim/init.lua new file mode 100644 index 0000000..5bbb707 --- /dev/null +++ b/stowdir/.config/nvim/init.lua @@ -0,0 +1,28 @@ +-- Bootstrap lazy.nvim +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.uv.fs_stat(lazypath) then + local out = vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "--branch=stable", + "https://github.com/folke/lazy.nvim.git", + lazypath, + }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + }, true, {}) + os.exit(1) + end +end +vim.opt.rtp:prepend(lazypath) + + +vim.g.mapleader = " " +vim.g.maplocalleader = "\\" +require("lazy").setup({ + spec = {}, + checker = { enabled = true }, +}) diff --git a/stowdir/.config/nvim/lazy-lock.json b/stowdir/.config/nvim/lazy-lock.json new file mode 100644 index 0000000..33f4480 --- /dev/null +++ b/stowdir/.config/nvim/lazy-lock.json @@ -0,0 +1,3 @@ +{ + "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" } +} diff --git a/stowdir/.config/nvim/nvim-features.md b/stowdir/.config/nvim/nvim-features.md new file mode 100644 index 0000000..fd6c354 --- /dev/null +++ b/stowdir/.config/nvim/nvim-features.md @@ -0,0 +1,508 @@ +# Neovim migration: feature checklist + +Goal: replicate the vim experience in neovim, using modern nvim best-practices +(lazy.nvim, builtin LSP, treesitter, etc.) rather than porting plugin-for-plugin. + +Decisions already made: + +- Independent configs from vim. No shared bundle/. +- Plugin manager: lazy.nvim. +- LSP: builtin nvim LSP via nvim-lspconfig + mason.nvim. Drop ALE. +- Snippets: LuaSnip. Hand-port custom snippets from UltiSnips. +- Telescope alongside FZF. Both available; pick per use case. +- Theme deferred. Use base16 + terminal palette when ready. +- LSPs/formatters/linters installed via mason, not setup.d. + +--- + +## Vanilla settings + +Most `set` options port directly to `vim.opt.` in lua. Same names, +same values. Block-port from `vimrc` to `lua/config/options.lua`. + +- [ ] `enc=utf-8` +- [ ] `nocompatible` (no-op in nvim, default) +- [ ] `keywordprg=:Man` +- [ ] `grepprg=rg --vimgrep --smart-case --follow` +- [ ] `autowrite`, `autoread`, `updatetime=1000` +- [ ] `hidden` +- [ ] Tabs / indent: `tabstop=4`, `softtabstop=0`, `expandtab`, `shiftwidth=4`, + `shiftround`, `smarttab`, `smartindent`, `autoindent`, + `backspace=indent,eol,start`, `nojoinspaces` +- [ ] `title`, `titlestring=...`, `titleold=`, `notitle` on VimLeave +- [ ] `number`, `scrolloff=6`, `sidescrolloff=6`, `virtualedit=all` +- [ ] `wildmenu`, `lazyredraw`, `showmatch`, `showcmd` +- [ ] Search: `incsearch`, `ignorecase`, `smartcase`, `hlsearch`, + `shortmess-=S` +- [ ] `mouse=a` +- [ ] `path+=**` +- [ ] `wildignore+=...` (.git, node_modules, target, build, etc.) +- [ ] Folding: `foldenable`, `foldlevelstart=15`, `foldnestmax=10`, + `foldmethod=indent` (treesitter folding may replace this; see Folding) +- [ ] `cursorline`, `colorcolumn=100`, `textwidth=100` +- [ ] `display=truncate` +- [ ] `equalalways` +- [ ] Undo: `undodir=~/.local/share/nvim/undo`, `undofile` +- [ ] Spell: `spelllang=en_us`, `spellfile=~/.config/nvim/spell/en.utf-8.add`, + `spelloptions=camel` +- [ ] viminfo/shada equivalent: `set shada=!,'500,/5000,:5000,<500,s1000,h` + (note: `shada` replaces `viminfo` in nvim) +- [ ] `pastetoggle=` (note: deprecated in nvim 0.9+; bracketed paste + handles this automatically. Probably drop.) +- [ ] `noshowmode` (lualine/airline shows mode) + +--- + +## Augroups / filetype detection + +- [ ] gitcommit `colorcolumn=72` +- [ ] disable shada for gitcommit and gitrebase (current: viminfo=) +- [ ] nginx detection (*.nginx, /etc/nginx/*, /usr/local/nginx/conf/*, + nginx.conf, nginx/*.conf) +- [ ] dotenv detection (*.env, *.env.*) +- [ ] yaml override `ts=4 sts=4 sw=4 expandtab` +- [ ] commentary settings (`commentstring` for c/cpp/nginx/qmake) +- [ ] Override rust gdb to `rust-gdb` +- [ ] Exit vim if quickfix is the last open window +- [ ] Exit vim if netrw is the last open window +- [ ] Spellfile sort/compile augroups (see Spelling) +- [ ] `paste_toggled` foldexpr workaround (probably drop with + `pastetoggle=` removal) + +--- + +## Theming / highlights + +Theme itself deferred to polish stage (use base16 + terminal palette). +These are the structural highlights independent of theme choice: + +- [ ] `Comment` italic + dim (currently `cterm=italic ctermfg=243`) +- [ ] `String` italic +- [ ] `CursorLine ctermbg=237`, `Visual ctermbg=237` +- [ ] `MatchParen ctermfg=0 ctermbg=6` +- [ ] `Spell{Bad,Rare,Cap,Local}` colors +- [ ] `CopilotSuggestion` italic + ctermfg=3 +- [ ] `MyTodo` augroup that highlights TODO/FIXME/BUG/NOTE/XXX/IMPORTANT + in comments. Treesitter has `@comment.todo`, `@comment.note`, + `@comment.warning` capture groups; can map highlights there instead + of using a vim regex match. +- [ ] `ss` mapping that echoes syntax group under cursor + (treesitter equivalent: `:Inspect` is builtin in nvim 0.9+) + +Doxygen: `g:load_doxygen_syntax`, `doxygen_enhanced_color`, the doxygen +highlight links. Treesitter does not have a dedicated doxygen parser; +nvim still loads vim's doxygen.vim syntax. Probably keep these settings +verbatim. + +--- + +## Statusline / tabline + +Current: vim-airline + airline-themes, with tabline showing splits but +not buffers, ascii symbols, custom colnr/linenr labels. + +- [ ] Statusline (mode, file, position, diagnostics). + Hypothesis: lualine.nvim. Or keep vim-airline (works in nvim). +- [ ] Tabline showing splits only, not buffers. (Per user preference, + "no modern editor tab.") + Hypothesis: lualine has a tabline option. Or just `set showtabline=0` + and skip the feature. +- [ ] ascii symbols (no powerline glyphs) + +--- + +## File / buffer navigation + +Current: FZF + fzf.vim with `` prefix family. + +- [ ] `` Buffers +- [ ] `` Files +- [ ] `` GFiles --cached --others --exclude-standard +- [ ] `` History: +- [ ] `` History/ +- [ ] `` History (file) +- [ ] `` Jumps +- [ ] `` Marks +- [ ] `` Snippets +- [ ] `` insert-mode path completion (fzf-complete-path) + +Hypothesis: keep FZF + fzf.vim verbatim. Add telescope alongside for +features it does notably better (live_grep with preview, lsp_references, +diagnostics). + +--- + +## Search / grep + +- [ ] `:grep` uses ripgrep (`grepprg`) +- [ ] Live grep with preview. + Hypothesis: telescope live_grep. +- [ ] Search history navigation + (already covered by ``/``) + +--- + +## LSP-like features (ALE replacement) + +Current: ALE provides linting, fixing, completion, hover, definition, +rename, references, all unified. + +Hypothesis: nvim builtin LSP (nvim-lspconfig) + mason for installs. +Diagnostics UI (`vim.diagnostic.config`) tuned to match ALE's look. + +Servers needed (by current language): + +- [ ] clangd (C, C++) with custom flags: + `--background-index --header-insertion=iwyu --pch-storage=memory + --completion-style=bundled --compute-dead --query-driver=... + -j=4 --clang-tidy` +- [ ] rust-analyzer with custom config: + `cargo.cfgs=['test'], features='all', procMacro.enable=true, + check.command='clippy', diagnostics.disabled=['unresolved-proc-macro']` +- [ ] ruff (Python lint + format) +- [ ] basedpyright or pyright (Python types) +- [ ] typescript-language-server +- [ ] eslint-language-server +- [ ] cmake-language-server (cmake_lint replacement) +- [ ] texlab (LaTeX) +- [ ] bash-language-server +- [ ] marksman (Markdown) + +Keybinds (currently ALE): + +- [ ] `` run all fixers (current: ALEFix) + Hypothesis: conform.nvim `format()` +- [ ] `` rename symbol + Hypothesis: `vim.lsp.buf.rename` +- [ ] `` find references in quickfix + Hypothesis: `vim.lsp.buf.references` or telescope `lsp_references` +- [ ] `` toggle header/source (CurtineIncSw, kept verbatim) +- [ ] `gd` go to definition + Hypothesis: `vim.lsp.buf.definition` +- [ ] `gD` go to type definition + Hypothesis: `vim.lsp.buf.type_definition` +- [ ] `K` hover (already builtin in nvim 0.10+) +- [ ] `]p` / `[p` next/previous problem + Hypothesis: `vim.diagnostic.jump({count=1})` etc. Note: `]d`/`[d` + are now builtin defaults; can rebind to `]p`/`[p` for muscle memory. +- [ ] `]q` / `[q` quickfix navigation (cnext/cprev, already in vim) + +Diagnostic UI (currently ALE): + +- [ ] virtual text shown only on current line (`virtualtext_cursor='current'`) +- [ ] virtual text starts at column 80, max column 120 +- [ ] floating preview for hover/details (no border) +- [ ] sign column always shown +- [ ] format `[severity][linter][code] message` + +Hypothesis: `vim.diagnostic.config({virtual_text=..., float=..., +underline=..., signs=...})` plus a `CursorMoved` autocmd for +current-line-only virtual text behavior. + +--- + +## Formatting + +Current ALE fixers, by filetype: + +- [ ] `*` remove_trailing_lines + trim_whitespace +- [ ] c clang-format +- [ ] cmake cmakeformat +- [ ] cpp clangtidy + clang-format +- [ ] css prettier +- [ ] html prettier (with `--print-width 120 --prose-wrap always + --tab-width 4 --html-whitespace-sensitivity css`) +- [ ] javascript prettier +- [ ] json jq (`--indent 4`) +- [ ] markdown dprint +- [ ] python ruff_format (`--line-length=100`) +- [ ] rust rustfmt + (`--config group_imports=StdExternalCrate,imports_granularity=Module + --style-edition=2024`) +- [ ] sh shfmt (`--indent 4`) +- [ ] tex latexindent (`--yaml="defaultIndent:' '"`) +- [ ] toml dprint +- [ ] vimwiki dprint + +Hypothesis: conform.nvim. Each language gets a `formatters_by_ft` entry, +custom args via `formatters` table. + +--- + +## Linting (non-LSP) + +ALE linters not covered by LSP: + +- [ ] cmake_lint (will be covered by cmake-language-server LSP, drop) +- [ ] chktex (LaTeX style) +- [ ] hadolint (Dockerfile, with `g:ale_dockerfile_hadolint_use_docker = 'yes'`) +- [ ] eslint (covered by eslint-language-server LSP) + +Hypothesis: nvim-lint for chktex and hadolint. Let LSPs cover the rest. + +--- + +## Completion + +Current: ALE completion, omnicompletion via ``/``, +`` accepts when popup is open, `` for path via fzf. + +- [ ] `` triggers completion +- [ ] `` accepts the selected completion +- [ ] `` path completion (kept via fzf, see File/buffer) +- [ ] LSP-driven completion sources +- [ ] Buffer completion source +- [ ] Path completion source +- [ ] Snippet completion source +- [ ] `completeopt=menu,menuone,popup` + +Hypothesis: blink.cmp (modern, fast). nvim-cmp is the older alternative. + +--- + +## Snippets + +Current: UltiSnips with `~/.vim/snips/*.snippets`, custom triggers, +Python interpolation, regex triggers. + +- [ ] `` expand snippet / jump forward +- [ ] `` jump backward +- [ ] Snippet picker (currently ``) +- [ ] Port `all.snippets`: copyright, date, datetime, uuid, box + (uuid uses Python; box uses Python) +- [ ] Port `c.snippets`: main +- [ ] Port `cpp.snippets`: class (basename-derived), using, namespace (regex) +- [ ] Port `html.snippets` +- [ ] Port `make.snippets` +- [ ] Port `markdown.snippets` +- [ ] Port `python.snippets` +- [ ] Port `sh.snippets` +- [ ] Port `snippets.snippets` (meta) +- [ ] Port `vimwiki.snippets` + +Hypothesis: LuaSnip for engine. friendly-snippets for community pack. +Custom snippets with Python interpolation rewritten as lua snippets. +Snippet picker via telescope (`:Telescope luasnip`) or via blink.cmp's +list. + +--- + +## Git integration + +- [ ] Hunk signs in sign column + Hypothesis: gitsigns.nvim (replaces vim-gitgutter) +- [ ] `]c` / `[c` next/previous hunk +- [ ] Hunk preview / stage / undo +- [ ] Line blame +- [ ] `:G`, `:Gdiff`, `:Gblame`, etc. + Hypothesis: vim-fugitive, kept verbatim +- [ ] gitcommit `colorcolumn=72` (already listed in Augroups) +- [ ] Mark colors driven by gitgutter (`SignatureMark{er}TextHLDynamic`) + Hypothesis: replicate via gitsigns + vim-signature + +--- + +## Editing helpers + +All vimscript, all work in nvim. Keep verbatim. + +- [ ] commentary (gcc, gc{motion}) +- [ ] vim-surround (cs/ds/ys) +- [ ] vim-repeat +- [ ] vim-unimpaired (`]q`, `[q`, `]b`, `[b`, etc.) +- [ ] vim-eunuch (`:Move`, `:Rename`, `:Chmod`, `:SudoWrite`) +- [ ] vim-indent-object (`ai`, `ii`) +- [ ] vim-textobj-comment + vim-textobj-user (`ac`, `ic`) +- [ ] quick-scope (highlights unique chars on f/F/t/T) +- [ ] vim-tmux-navigator (`` between tmux + vim panes) + +--- + +## Custom keybinds + +- [ ] `` clears search highlight +- [ ] `<` and `>` in visual reselect after indent +- [ ] System clipboard via `clip` script: + - [ ] `` paste in i/v/n + - [ ] `` copy in i/v/n +- [ ] `` toggles fold +- [ ] `j`/`k` move by visual line +- [ ] `i#` doesn't bring comment to col 0 +- [ ] `` open new empty buffer +- [ ] `:bd` doesn't close window (cnoreabbrev workaround) + +--- + +## Folding + +- [ ] enabled, level 15, max nest 10 +- [ ] `foldmethod=indent` (currently chosen for cpp speed) +- [ ] `` toggles fold +- [ ] vimwiki uses syntax folding (`g:vimwiki_folding = 'syntax'`) + +Hypothesis: treesitter folding (`foldexpr=v:lua.vim.treesitter.foldexpr()`) +is faster than indent. Try it on large C++ files. + +--- + +## Spelling + +- [ ] `` toggle spell +- [ ] custom `~/.vim/spell/en.utf-8.add` -> port location +- [ ] SetupSpellfile() function: rebuild .spl from .add when stale +- [ ] SortSpellfile() function: sort+dedupe .add on VimLeave + +Hypothesis: same lua function in `lua/config/spelling.lua`. + +--- + +## Undo + +- [ ] persistent undo (`undofile`) in `~/.local/share/nvim/undo` +- [ ] undo tree visualization + Hypothesis: vim-mundo (kept) or undotree.vim + +--- + +## Mark display + +- [ ] vim-signature (kept). Marks shown in sign column with gitgutter + driving the color. + +--- + +## Manpager + +- [ ] vim used as MANPAGER (`man -P 'vim ...'` use case) + Hypothesis: nvim has builtin man support. `:Man` works out of the box. + Use `MANPAGER='nvim +Man\!'` env var. Drop vim-manpager. +- [ ] after/ftplugin/man.vim customization (port to ftplugin/man.lua + or remove if defaults are fine) + +--- + +## Local vimrc + +- [ ] `g:localvimrc_ask=0` (auto-source per-project .lvimrc) + Hypothesis: vim-localvimrc kept verbatim. nvim's `vim.secure.read` + is narrower in scope. + +--- + +## ANSI escape rendering + +- [ ] AnsiEsc plugin to render ANSI color codes in buffer. + Hypothesis: vim-plugin-AnsiEsc kept verbatim. (No nvim-native peer.) + +--- + +## Debugging + +Current: vimspector with debugpy, vscode-cpptools, CodeLLDB. + +- [ ] `` toggle breakpoint +- [ ] `` continue +- [ ] `` pause +- [ ] `du/dd` up/down frame +- [ ] `db` breakpoints +- [ ] `ds/dn/df` step into/over/out +- [ ] `dc` run to cursor +- [ ] `]d`/`[d` jump to next/prev breakpoint + Note: collides with new `]d`/`[d` LSP diagnostic builtin. +- [ ] `di` inspect (n/v) +- [ ] custom process picker via fzf + +Hypothesis: vimspector kept verbatim. Reassess vs nvim-dap if vimspector +falls short. + +--- + +## Filetypes / language plugins + +Plugins kept (no nvim-native peer or treesitter parser): + +- [ ] vim-bitbake +- [ ] vim-flatbuffers +- [ ] vim-ps1 + +Treesitter parsers (replace highlight plugins): + +- [ ] cpp (replaces vim-cpp-enhanced-highlight; preserve + `cpp_class_scope_highlight`, `cpp_posix_standard` settings via + treesitter equivalents if possible) +- [ ] c, rust, python, javascript, typescript, json, html, css, + markdown, toml, yaml, bash, lua, vimdoc, vim, latex, + cmake, gitcommit, diff + +Drop: + +- [ ] rust.vim (treesitter + rust-analyzer cover everything used) +- [ ] vim-toml (treesitter has toml) +- [ ] vim-systemd-syntax (builtin) +- [ ] vim-cpp-enhanced-highlight (treesitter) + +--- + +## Copilot + +- [ ] copilot.vim (kept verbatim; officially supported on nvim) +- [ ] `g:copilot_filetypes` config (disable on text, dotenv) +- [ ] `` dismiss +- [ ] `` accept next word +- [ ] `CopilotSuggestion` highlight (already in Highlights) + +--- + +## Vimwiki + +- [ ] vimwiki kept verbatim +- [ ] All `g:vimwiki_*` settings: path, ext, syntax, auto_tags, + automatic_nested_syntaxes, nested_syntaxes, auto_toc, + folding=syntax, key_mappings.table_mappings=0, conceallevel=0 +- [ ] mundo preview width (`g:mundo_preview_bottom`) + +--- + +## Testing (vim-test) + +- [ ] vim-test kept verbatim +- [ ] strategy = "dispatch" + +--- + +## Drop entirely + +- [ ] vim-altscreen (nvim handles altscreen natively; remove `SetAltScreen()` + calls in vimrc) +- [ ] vim-autoread (use builtin `set autoread` + CursorHold `:checktime` + autocmd; or keep if 1000ms polling is missed) +- [ ] vim-manpager (nvim builtin replaces it) +- [ ] rust.vim +- [ ] vim-toml +- [ ] vim-systemd-syntax +- [ ] vim-cpp-enhanced-highlight +- [ ] vis (was for visual-block `:S` substitutions; user confirmed drop) + +--- + +## Hugefile alternate vimrc + +- [ ] vimrc.hugefile equivalent for editing huge files + (no plugins, no autoread, etc.) + Hypothesis: separate `init-hugefile.lua` invoked via + `nvim -u ~/.config/nvim/init-hugefile.lua`. + +--- + +## Open questions + +1. Treesitter folding vs indent folding for large C++. Compare in practice. +2. blink.cmp vs nvim-cmp. blink is newer, nvim-cmp is more battle-tested. +3. Whether to keep vim-airline or move to lualine. Lualine is more modern + but airline already works. +4. `]d`/`[d` collision: nvim's new builtin diagnostic jumps vs your + current vimspector breakpoint jumps. Pick one. +5. Whether to keep custom MyTodo augroup or use treesitter + `@comment.todo` capture group. +6. Whether `pastetoggle=` and the FastPaste augroup are still useful + given nvim's bracketed paste handling. From cdf08e0401b5b2535ec2ab44d3739dd7a44e01ac Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 16:47:45 -0500 Subject: [PATCH 02/50] nvim: Load config/*.lua modules --- stowdir/.config/nvim/init.lua | 11 ++++++++--- stowdir/.config/nvim/lua/config/indentation.lua | 5 +++++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 stowdir/.config/nvim/lua/config/indentation.lua diff --git a/stowdir/.config/nvim/init.lua b/stowdir/.config/nvim/init.lua index 5bbb707..744abd0 100644 --- a/stowdir/.config/nvim/init.lua +++ b/stowdir/.config/nvim/init.lua @@ -1,3 +1,11 @@ +vim.g.mapleader = " " +vim.g.maplocalleader = "\\" + +-- Auto-load every lua/config/*.lua module in alphabetical order +for _, path in ipairs(vim.api.nvim_get_runtime_file("lua/config/*.lua", true)) do + require("config." .. path:match("lua/config/(.+)%.lua$")) +end + -- Bootstrap lazy.nvim local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.uv.fs_stat(lazypath) then @@ -19,9 +27,6 @@ if not vim.uv.fs_stat(lazypath) then end vim.opt.rtp:prepend(lazypath) - -vim.g.mapleader = " " -vim.g.maplocalleader = "\\" require("lazy").setup({ spec = {}, checker = { enabled = true }, diff --git a/stowdir/.config/nvim/lua/config/indentation.lua b/stowdir/.config/nvim/lua/config/indentation.lua new file mode 100644 index 0000000..7b4d753 --- /dev/null +++ b/stowdir/.config/nvim/lua/config/indentation.lua @@ -0,0 +1,5 @@ +vim.opt.tabstop = 4 +vim.opt.shiftwidth = 4 +vim.opt.expandtab = true +vim.opt.smartindent = true +vim.opt.shiftround = true From 38a1f056e707fa4fc49b5a577153366ac1311e54 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 17:09:27 -0500 Subject: [PATCH 03/50] nvim: Add telescope plugin --- stowdir/.config/nvim/init.lua | 2 +- stowdir/.config/nvim/lazy-lock.json | 5 ++- .../.config/nvim/lua/plugins/telescope.lua | 44 +++++++++++++++++++ 3 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 stowdir/.config/nvim/lua/plugins/telescope.lua diff --git a/stowdir/.config/nvim/init.lua b/stowdir/.config/nvim/init.lua index 744abd0..83dbb35 100644 --- a/stowdir/.config/nvim/init.lua +++ b/stowdir/.config/nvim/init.lua @@ -28,6 +28,6 @@ end vim.opt.rtp:prepend(lazypath) require("lazy").setup({ - spec = {}, + spec = { { import = "plugins" } }, checker = { enabled = true }, }) diff --git a/stowdir/.config/nvim/lazy-lock.json b/stowdir/.config/nvim/lazy-lock.json index 33f4480..1d71add 100644 --- a/stowdir/.config/nvim/lazy-lock.json +++ b/stowdir/.config/nvim/lazy-lock.json @@ -1,3 +1,6 @@ { - "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" } + "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, + "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, + "telescope.nvim": { "branch": "master", "commit": "ec009610d5d259ec59a6edf0219ef3f7ee4732e5" } } diff --git a/stowdir/.config/nvim/lua/plugins/telescope.lua b/stowdir/.config/nvim/lua/plugins/telescope.lua new file mode 100644 index 0000000..ac8c476 --- /dev/null +++ b/stowdir/.config/nvim/lua/plugins/telescope.lua @@ -0,0 +1,44 @@ +return { + { + "nvim-telescope/telescope.nvim", + dependencies = { + "nvim-lua/plenary.nvim", + { "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, + }, + cmd = { "Telescope", "Rg" }, + keys = { + { "", "Telescope buffers", desc = "Telescope buffers" }, + { + "", + function() + require("telescope.builtin").find_files({ + find_command = { "fd", "--type", "f", "--hidden", "--no-ignore", "--exclude", ".git" }, + }) + end, + desc = "Telescope find non-VCS files", + }, + { + "", + function() + require("telescope.builtin").find_files({ + find_command = { "fd", "--type", "f", "--hidden" }, + }) + end, + desc = "Telescope find VCS files", + }, + { "", "Telescope command_history", desc = "Telescope command history" }, + { "", "Telescope search_history", desc = "Telescope search history" }, + { "", "Telescope oldfiles", desc = "Telescope file history" }, + { "", "Telescope jumplist", desc = "Telescope jumps" }, + { "", "Telescope marks", desc = "Telescope marks" }, + }, + config = function() + require("telescope").setup({}) + require("telescope").load_extension("fzf") + + vim.api.nvim_create_user_command("Rg", function(opts) + require("telescope.builtin").live_grep({ default_text = opts.args }) + end, { nargs = "*" }) + end, + }, +} From 7f086f273588a51e87ee4426e5f3a59d2ee1d6fb Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 17:22:04 -0500 Subject: [PATCH 04/50] nvim: search settings --- stowdir/.config/nvim/lua/config/search.lua | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 stowdir/.config/nvim/lua/config/search.lua diff --git a/stowdir/.config/nvim/lua/config/search.lua b/stowdir/.config/nvim/lua/config/search.lua new file mode 100644 index 0000000..af9262e --- /dev/null +++ b/stowdir/.config/nvim/lua/config/search.lua @@ -0,0 +1,6 @@ +vim.opt.ignorecase = true +vim.opt.smartcase = true + +vim.opt.grepprg = "rg --vimgrep --smart-case --follow" + +vim.keymap.set("n", "", "nohlsearch", { silent = true }) From b81e69203cada4330fe848bf807bbaed537302c8 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 17:39:15 -0500 Subject: [PATCH 05/50] nvim: display & editing option --- stowdir/.config/nvim/lua/config/editing.lua | 68 +++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 stowdir/.config/nvim/lua/config/editing.lua diff --git a/stowdir/.config/nvim/lua/config/editing.lua b/stowdir/.config/nvim/lua/config/editing.lua new file mode 100644 index 0000000..96469fd --- /dev/null +++ b/stowdir/.config/nvim/lua/config/editing.lua @@ -0,0 +1,68 @@ +vim.opt.number = true +vim.opt.cursorline = true +vim.opt.colorcolumn = "100" +vim.opt.textwidth = 100 +vim.opt.scrolloff = 6 +vim.opt.sidescrolloff = 6 +vim.opt.virtualedit = "all" +vim.opt.display = "truncate" + +vim.opt.lazyredraw = true +vim.opt.showmatch = true + +vim.api.nvim_create_autocmd("FileType", { + group = vim.api.nvim_create_augroup("editing_gitcommit", { clear = true }), + pattern = "gitcommit", + callback = function() vim.opt_local.colorcolumn = "72" end, +}) + +-- Reselect visual block after indent. +vim.keymap.set("v", "<", "", ">gv") + +-- Move by visual line so wrapped lines feel like arrow-key movement. +vim.keymap.set("n", "j", "gj") +vim.keymap.set("n", "k", "gk") + +-- Defeat smartindent's habit of yanking `#` to column 0. +vim.keymap.set("i", "#", "X#") + +-- New empty buffer. +vim.keymap.set("n", "", "enew") + +-- Buffer and quickfix navigation (replaces vim-unimpaired's ]b/[b/]q/[q). +vim.keymap.set("n", "]b", "bnext") +vim.keymap.set("n", "[b", "bprevious") +vim.keymap.set("n", "]q", "cnext") +vim.keymap.set("n", "[q", "cprevious") + +-- :bd / :bd! delete the current buffer but keep the window open by switching to another buffer first. +vim.api.nvim_create_user_command("Bd", function(opts) + local current = vim.api.nvim_get_current_buf() + + -- Surface "no write since last change" before switching, so the user + -- stays on the modified buffer rather than ending up on the alternate. + if not opts.bang and vim.bo[current].modified then + vim.notify( + ("E89: No write since last change for buffer %d (use :Bd!)"):format(current), + vim.log.levels.ERROR + ) + return + end + + local has_others = false + for _, info in ipairs(vim.fn.getbufinfo({ buflisted = 1 })) do + if info.bufnr ~= current then + has_others = true + break + end + end + if has_others then + vim.cmd("bprevious") + else + vim.cmd("enew") + end + vim.cmd(("bdelete%s %d"):format(opts.bang and "!" or "", current)) +end, { bang = true }) + +vim.cmd([[cnoreabbrev bd getcmdtype() == ':' && getcmdline() == 'bd' ? 'Bd' : 'bdelete']]) From 3ecb7e334aed8b452117a3be4591df936cbf8187 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 17:41:44 -0500 Subject: [PATCH 06/50] nvim: clipboard --- stowdir/.config/nvim/lua/config/clipboard.lua | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 stowdir/.config/nvim/lua/config/clipboard.lua diff --git a/stowdir/.config/nvim/lua/config/clipboard.lua b/stowdir/.config/nvim/lua/config/clipboard.lua new file mode 100644 index 0000000..eb3f026 --- /dev/null +++ b/stowdir/.config/nvim/lua/config/clipboard.lua @@ -0,0 +1,7 @@ +-- System-clipboard bindings via the `clip` script. By using `clip`, I get x11, wayland, and sshclip support +vim.keymap.set("i", "", [[=system('clip --paste')]], { silent = true }) +vim.keymap.set("i", "", [["cyy:call system('clip --copy', @c)]], { silent = true }) +vim.keymap.set("v", "", [["cy:call system('clip --copy', @c)]], { silent = true }) +vim.keymap.set("v", "", [[:let @c=system('clip --paste')gv"cP]], { silent = true }) +vim.keymap.set("n", "", [[:let @c=system('clip --paste')"cP]], { silent = true }) +vim.keymap.set("n", "", [["cyy:call system('clip --copy', @c)]], { silent = true }) From 3df6116daf0f4f78f18ae926e9f984b42150b2bd Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 17:50:35 -0500 Subject: [PATCH 07/50] nvim: Add treesitter --- stowdir/.config/nvim/lazy-lock.json | 1 + .../.config/nvim/lua/plugins/treesitter.lua | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 stowdir/.config/nvim/lua/plugins/treesitter.lua diff --git a/stowdir/.config/nvim/lazy-lock.json b/stowdir/.config/nvim/lazy-lock.json index 1d71add..85378a0 100644 --- a/stowdir/.config/nvim/lazy-lock.json +++ b/stowdir/.config/nvim/lazy-lock.json @@ -1,5 +1,6 @@ { "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, + "nvim-treesitter": { "branch": "master", "commit": "cf12346a3414fa1b06af75c79faebe7f76df080a" }, "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, "telescope.nvim": { "branch": "master", "commit": "ec009610d5d259ec59a6edf0219ef3f7ee4732e5" } diff --git a/stowdir/.config/nvim/lua/plugins/treesitter.lua b/stowdir/.config/nvim/lua/plugins/treesitter.lua new file mode 100644 index 0000000..937e141 --- /dev/null +++ b/stowdir/.config/nvim/lua/plugins/treesitter.lua @@ -0,0 +1,40 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + branch = "master", + build = ":TSUpdate", + event = { "BufReadPost", "BufNewFile" }, + config = function() + require("nvim-treesitter.configs").setup({ + ensure_installed = { + "bash", + "c", + "cmake", + "cpp", + "css", + "diff", + "dockerfile", + "gitcommit", + "gitignore", + "html", + "javascript", + "json", + "latex", + "lua", + "markdown", + "markdown_inline", + "python", + "rust", + "toml", + "tsx", + "typescript", + "vim", + "vimdoc", + "yaml", + }, + highlight = { enable = true }, + indent = { enable = true }, + }) + end, + }, +} From c58a9646fb1aebf6bc1065e2bdccbc0c33cf7389 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 17:50:54 -0500 Subject: [PATCH 08/50] nvim: Add treesitter based folding --- stowdir/.config/nvim/init.lua | 2 +- stowdir/.config/nvim/lua/config/folding.lua | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 stowdir/.config/nvim/lua/config/folding.lua diff --git a/stowdir/.config/nvim/init.lua b/stowdir/.config/nvim/init.lua index 83dbb35..4741877 100644 --- a/stowdir/.config/nvim/init.lua +++ b/stowdir/.config/nvim/init.lua @@ -1,4 +1,4 @@ -vim.g.mapleader = " " +vim.g.mapleader = "\\" vim.g.maplocalleader = "\\" -- Auto-load every lua/config/*.lua module in alphabetical order diff --git a/stowdir/.config/nvim/lua/config/folding.lua b/stowdir/.config/nvim/lua/config/folding.lua new file mode 100644 index 0000000..6733f1b --- /dev/null +++ b/stowdir/.config/nvim/lua/config/folding.lua @@ -0,0 +1,6 @@ +vim.opt.foldlevelstart = 15 +vim.opt.foldnestmax = 10 +vim.opt.foldmethod = "expr" +vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()" + +vim.keymap.set("n", "", "za") From 7590924015a19cd796c25339149e4e7b632bbb95 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 17:54:17 -0500 Subject: [PATCH 09/50] nvim: Add spelling config and wordlist --- stowdir/.config/nvim/lua/config/spelling.lua | 43 +++ stowdir/.config/nvim/spell/en.utf-8.add | 259 +++++++++++++++++++ 2 files changed, 302 insertions(+) create mode 100644 stowdir/.config/nvim/lua/config/spelling.lua create mode 100644 stowdir/.config/nvim/spell/en.utf-8.add diff --git a/stowdir/.config/nvim/lua/config/spelling.lua b/stowdir/.config/nvim/lua/config/spelling.lua new file mode 100644 index 0000000..e382a05 --- /dev/null +++ b/stowdir/.config/nvim/lua/config/spelling.lua @@ -0,0 +1,43 @@ +vim.opt.spelllang = "en_us" +vim.opt.spelloptions = "camel" +vim.opt.spellfile = vim.fn.stdpath("config") .. "/spell/en.utf-8.add" + +local spell_dir = vim.fn.stdpath("config") .. "/spell" +if vim.fn.isdirectory(spell_dir) == 0 then + vim.fn.mkdir(spell_dir, "p") +end + +vim.keymap.set({ "n", "i" }, "", "setlocal spell! spell?") + +-- Recompile *.spl from *.add when the source is newer (keeps binary .spl file out of git). +local function setup_spellfile() + for _, add in ipairs(vim.fn.glob(spell_dir .. "/*.add", true, true)) do + local spl = add .. ".spl" + if vim.fn.filereadable(add) == 1 + and (vim.fn.filereadable(spl) == 0 or vim.fn.getftime(add) > vim.fn.getftime(spl)) then + vim.cmd("silent mkspell! " .. vim.fn.fnameescape(add)) + end + end +end + +-- Sort/dedupe *.add on exit so the file is diff-friendly. Only write if the +-- result differs from the current contents, otherwise mtime updates would +-- confuse git rebases. +local function sort_spellfile() + for _, add in ipairs(vim.fn.glob(spell_dir .. "/*.add", true, true)) do + local current = vim.fn.readfile(add) + local sorted = vim.fn.systemlist({ "sort", "--unique", add }) + if not vim.deep_equal(current, sorted) then + vim.fn.writefile(sorted, add) + end + end +end + +vim.api.nvim_create_autocmd("VimEnter", { + group = vim.api.nvim_create_augroup("spellfile_compile", { clear = true }), + callback = setup_spellfile, +}) +vim.api.nvim_create_autocmd("VimLeave", { + group = vim.api.nvim_create_augroup("spellfile_sort", { clear = true }), + callback = sort_spellfile, +}) diff --git a/stowdir/.config/nvim/spell/en.utf-8.add b/stowdir/.config/nvim/spell/en.utf-8.add new file mode 100644 index 0000000..f0dd2f4 --- /dev/null +++ b/stowdir/.config/nvim/spell/en.utf-8.add @@ -0,0 +1,259 @@ +2D +3D +ACK +analytics +Asemic +async +ATD +Autocompletion +autofilled +autoread +autowrite +awk +AxiDraw +backend +backport +backported +backporting +backpressure +barcode +bashrc +BitBake +bool +boolean +breakpoint +bugfix +CamelCase +candump +candumps +CCW +clangd +CLI +clothoid +clothoids +cmake +collinear +commandline +Commandline +composable +Composable +conf +config +configs +const +coredumps +cpp +cppcheck +creational +CSS +CSV +CUDA +cursorcolumn +customizations +databroker +Delaunay +deserialization +deserialize +destructor +dev +DHCP +dimensionality +dotfiles +Doxygen +Dubin's +enum +EOF +ethernet +extentslib +ffmpeg +FieldSync +filename +filenames +filesystem +filetype +filetypes +FIXME +fixups +foldexpr +fontawesome +fzf +gdb +GEOMETRYCOLLECTION +GIS +gitgutter +github +gitignore +gitlint +globals +goto +GPT +Grafana +gruvbox +Handoff +Herostratus +hexchat +homelab +hotspot +HTTPS +idiosyncracies +ignorecase +init +initializer +instantiation +interrogable +Interrogable +IPv4 +ipv6 +iteratively +jetstream +JIRA +json +keybinds +Keybinds +KVM +LaTeX +libcxxabi +libgcc +libssh2 +libunwind +lightbulb +Lindenmayer +linestring +LINESTRING +linestrings +linters +llvm +localhost +Lol +lookahead +loopback +makefile +masse +md +metadata +Minecraft +mockups +monorepo +MULTILINESTRING +MULTIPOINT +MULTIPOLYGON +namespace +NAS +natively +navbar +nginx +nohup +nvidia +OFX +OpenGL +pandoc +parameterized +paren +parens +PCA +PDU +perf +PGN +piecewise +PiHole +plaintext +Plex +POC +popup +POSIX +PowerShell +pre +preprocess +Prusinkiewicz +pyglet +QtCore +QtCreator +README +rebase +Rebase +recurse +reimport +renderer +replanned +repo +resumable +ripgrep +Roadmap +ROS +RS1 +RSS +runtime +runtimes +SBC +sed +SFP +shapefile +shapefiles +shapelib +shellcheck +shellformat +SMS +src +stateful +statusbar +stderr +stdin +stdout +struct +subclasses +sublist +submodule +submodules +subtree +sudo +SVD +SVG +syslog +Tartarus +terraform +Theming +threadsafe +tilings +Tilix +timestamp +timestamps +TOC +TODO +TODOs +toolchain +toolchains +torrenting +TTY +txt +typedef +UHaul +UI +UML +unstage +Untracked +unwinder +unwinders +usr +utils +vectorlib +vendored +vimrc +vimwiki +VPN +VR +VSN +vsplit +Wackery +Watchpoints +waypoint +waypoints +whitespace +WKB +wkt +WKT +wordcloud +writeup +writeups +Yocto +zeromq +zoomer From c928f07929b0737e5dae4441435f65039d43c8f2 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 17:58:56 -0500 Subject: [PATCH 10/50] nvim: undo --- stowdir/.config/nvim/lazy-lock.json | 1 + stowdir/.config/nvim/lua/config/undo.lua | 7 +++++++ stowdir/.config/nvim/lua/plugins/telescope.lua | 10 ++++++++++ 3 files changed, 18 insertions(+) create mode 100644 stowdir/.config/nvim/lua/config/undo.lua diff --git a/stowdir/.config/nvim/lazy-lock.json b/stowdir/.config/nvim/lazy-lock.json index 85378a0..d9248fc 100644 --- a/stowdir/.config/nvim/lazy-lock.json +++ b/stowdir/.config/nvim/lazy-lock.json @@ -3,5 +3,6 @@ "nvim-treesitter": { "branch": "master", "commit": "cf12346a3414fa1b06af75c79faebe7f76df080a" }, "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, + "telescope-undo.nvim": { "branch": "main", "commit": "928d0c2dc9606e01e2cc547196f48d2eaecf58e5" }, "telescope.nvim": { "branch": "master", "commit": "ec009610d5d259ec59a6edf0219ef3f7ee4732e5" } } diff --git a/stowdir/.config/nvim/lua/config/undo.lua b/stowdir/.config/nvim/lua/config/undo.lua new file mode 100644 index 0000000..e50f64d --- /dev/null +++ b/stowdir/.config/nvim/lua/config/undo.lua @@ -0,0 +1,7 @@ +local undo_dir = vim.fn.stdpath("data") .. "/undo" +if vim.fn.isdirectory(undo_dir) == 0 then + vim.fn.mkdir(undo_dir, "p") +end + +vim.opt.undodir = undo_dir +vim.opt.undofile = true diff --git a/stowdir/.config/nvim/lua/plugins/telescope.lua b/stowdir/.config/nvim/lua/plugins/telescope.lua index ac8c476..978bb7a 100644 --- a/stowdir/.config/nvim/lua/plugins/telescope.lua +++ b/stowdir/.config/nvim/lua/plugins/telescope.lua @@ -41,4 +41,14 @@ return { end, { nargs = "*" }) end, }, + { + "debugloop/telescope-undo.nvim", + dependencies = "nvim-telescope/telescope.nvim", + keys = { + { "", "Telescope undo", desc = "Telescope undo history" }, + }, + config = function() + require("telescope").load_extension("undo") + end, + }, } From 02753f1229cbe57e50c188bcdbce71364a4191dc Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 18:02:27 -0500 Subject: [PATCH 11/50] nvim: Terminal title --- stowdir/.config/nvim/lua/config/title.lua | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 stowdir/.config/nvim/lua/config/title.lua diff --git a/stowdir/.config/nvim/lua/config/title.lua b/stowdir/.config/nvim/lua/config/title.lua new file mode 100644 index 0000000..29773f3 --- /dev/null +++ b/stowdir/.config/nvim/lua/config/title.lua @@ -0,0 +1,8 @@ +vim.opt.title = true +vim.opt.titlestring = "%{$USER}@%{hostname()}: %F %m" +vim.opt.titleold = "" + +vim.api.nvim_create_autocmd("VimLeave", { + group = vim.api.nvim_create_augroup("title_clear_on_exit", { clear = true }), + callback = function() vim.opt.title = false end, +}) From ee64382ea12ff0fa1a5edadf1e19a9f6dc5b484e Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 18:14:02 -0500 Subject: [PATCH 12/50] nvim: persistent history settings --- stowdir/.config/nvim/lua/config/history.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 stowdir/.config/nvim/lua/config/history.lua diff --git a/stowdir/.config/nvim/lua/config/history.lua b/stowdir/.config/nvim/lua/config/history.lua new file mode 100644 index 0000000..5ec5073 --- /dev/null +++ b/stowdir/.config/nvim/lua/config/history.lua @@ -0,0 +1,16 @@ +-- ! - save and restore global variables +-- ' - max files to remember marks from +-- / - max search-pattern history entries +-- : - max command-line history entries +-- < - max lines saved per register +-- s - max kbytes per register +-- h - don't restore hlsearch from shada +vim.opt.shada = "!,'500,/5000,:5000,<500,s1000,h" + +-- Don't restore cursor position (or anything else) for git commit / rebase +-- buffers, where the cursor should always start at the top. +vim.api.nvim_create_autocmd("FileType", { + group = vim.api.nvim_create_augroup("history_disable_for_git", { clear = true }), + pattern = { "gitcommit", "gitrebase" }, + callback = function() vim.opt_local.shada = "" end, +}) From d31e33a3809ef790471f02e9f20cbe30a6779316 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 18:14:32 -0500 Subject: [PATCH 13/50] nvim: filetypes --- stowdir/.config/nvim/lua/config/filetypes.lua | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 stowdir/.config/nvim/lua/config/filetypes.lua diff --git a/stowdir/.config/nvim/lua/config/filetypes.lua b/stowdir/.config/nvim/lua/config/filetypes.lua new file mode 100644 index 0000000..57da7f5 --- /dev/null +++ b/stowdir/.config/nvim/lua/config/filetypes.lua @@ -0,0 +1,47 @@ +vim.filetype.add({ + extension = { nginx = "nginx" }, + filename = { ["nginx.conf"] = "nginx" }, + pattern = { + [".*/etc/nginx/.*"] = "nginx", + [".*/usr/local/nginx/conf/.*"] = "nginx", + [".*/nginx/.*%.conf"] = "nginx", + [".*%.env"] = "sh", + [".*%.env%..*"] = "sh", + }, +}) + +local group = vim.api.nvim_create_augroup("filetype_overrides", { clear = true }) + +vim.api.nvim_create_autocmd("FileType", { + group = group, + pattern = "yaml", + callback = function() + vim.opt_local.tabstop = 4 + vim.opt_local.softtabstop = 4 + vim.opt_local.shiftwidth = 4 + vim.opt_local.expandtab = true + end, +}) + +vim.api.nvim_create_autocmd("FileType", { + group = group, + pattern = { "c", "cpp" }, + callback = function() + vim.opt_local.comments:prepend(":///,://!") + vim.opt_local.commentstring = "// %s" + end, +}) + +vim.api.nvim_create_autocmd("FileType", { + group = group, + pattern = { "nginx", "qmake" }, + callback = function() + vim.opt_local.commentstring = "# %s" + end, +}) + +vim.api.nvim_create_autocmd("FileType", { + group = group, + pattern = "rust", + callback = function() vim.g.termdebugger = "rust-gdb" end, +}) From ca9ddf36b9a0cb5399765057efb3749f3d07336c Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 18:29:45 -0500 Subject: [PATCH 14/50] nvim: filewatching --- stowdir/.config/nvim/lua/config/filewatching.lua | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 stowdir/.config/nvim/lua/config/filewatching.lua diff --git a/stowdir/.config/nvim/lua/config/filewatching.lua b/stowdir/.config/nvim/lua/config/filewatching.lua new file mode 100644 index 0000000..ed240aa --- /dev/null +++ b/stowdir/.config/nvim/lua/config/filewatching.lua @@ -0,0 +1,7 @@ +vim.opt.autowrite = true +vim.opt.updatetime = 1000 + +vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, { + group = vim.api.nvim_create_augroup("filewatching_checktime", { clear = true }), + command = "checktime", +}) From 6891d36ef7797686f2a588c012a3b418ab70f288 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 18:32:37 -0500 Subject: [PATCH 15/50] nvim: misc builtins --- stowdir/.config/nvim/lua/config/paths.lua | 21 +++++++++++++++++++ stowdir/.config/nvim/lua/config/windowing.lua | 13 ++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 stowdir/.config/nvim/lua/config/paths.lua create mode 100644 stowdir/.config/nvim/lua/config/windowing.lua diff --git a/stowdir/.config/nvim/lua/config/paths.lua b/stowdir/.config/nvim/lua/config/paths.lua new file mode 100644 index 0000000..6290d8e --- /dev/null +++ b/stowdir/.config/nvim/lua/config/paths.lua @@ -0,0 +1,21 @@ +vim.opt.path:append("**") + +vim.opt.wildignore:append({ + ".git/*", + "*/node_modules/*", + "*/target/*", + "*/build/*", + "*.class", + "*.png", + "*.gif", + "*.pdf", + "*.exe", + "*.o", + "*.so", + "*.jar", + "*.war", + "*.ear", + "*.dll", + "*.swp", + "*.zip", +}) diff --git a/stowdir/.config/nvim/lua/config/windowing.lua b/stowdir/.config/nvim/lua/config/windowing.lua new file mode 100644 index 0000000..fbdc512 --- /dev/null +++ b/stowdir/.config/nvim/lua/config/windowing.lua @@ -0,0 +1,13 @@ +-- Quit nvim if quickfix or netrw is the only remaining window. +vim.api.nvim_create_autocmd("WinEnter", { + group = vim.api.nvim_create_augroup("windowing_exit_if_last", { clear = true }), + callback = function() + if vim.fn.winnr("$") ~= 1 then return end + if vim.bo.buftype == "quickfix" then + vim.bo.buftype = "nofile" + vim.cmd("quit") + elseif vim.bo.filetype == "netrw" then + vim.cmd("quit") + end + end, +}) From dcd7aa7b76bc8a10547c86610baa0d200a1259ea Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 18:40:09 -0500 Subject: [PATCH 16/50] git: Switch to neovim as editor --- stowdir/.gitconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stowdir/.gitconfig b/stowdir/.gitconfig index c13c25f..bf4264d 100644 --- a/stowdir/.gitconfig +++ b/stowdir/.gitconfig @@ -2,7 +2,7 @@ name = Austin Gill email = Notgnoshi@gmail.com [core] - editor = vim + editor = nvim fileMode = false eol = lf autocrlf = input From a3fa1e5707f06a89a476cb9c92e363307ccf5988 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 18:46:19 -0500 Subject: [PATCH 17/50] Switch to nvim as default I think I'm fairly convinced now to switch to the new thing. I don't like change, but it seems pretty nice. No big major features, just a bit more polished, more performant, and possibly more future-proof? --- bashrc.d/070-environment.sh | 22 ++++++++-------------- stowdir/.local/bin/vim | 9 +++++++++ 2 files changed, 17 insertions(+), 14 deletions(-) create mode 100755 stowdir/.local/bin/vim diff --git a/bashrc.d/070-environment.sh b/bashrc.d/070-environment.sh index 8ecd789..f7ff0ba 100644 --- a/bashrc.d/070-environment.sh +++ b/bashrc.d/070-environment.sh @@ -27,27 +27,21 @@ export FZF_CTRL_R_OPTS=" \ )\" \ " -# Use vim as my MANPAGER. Has folding, ability to follow links. -MANPAGER="vim -M +MANPAGER -" -MANWIDTH=100 +# Use nvim as my MANPAGER. Has folding, ability to follow links. +export MANPAGER='nvim +Man!' +export MANWIDTH=100 # Add local header files to gcc include path -C_INCLUDE_PATH="$HOME/.local/include${C_INCLUDE_PATH:+:${C_INCLUDE_PATH}}" -CPLUS_INCLUDE_PATH="$HOME/.local/include${CPLUS_INCLUDE_PATH:+:${CPLUS_INCLUDE_PATH}}" +export C_INCLUDE_PATH="$HOME/.local/include${C_INCLUDE_PATH:+:${C_INCLUDE_PATH}}" +export CPLUS_INCLUDE_PATH="$HOME/.local/include${CPLUS_INCLUDE_PATH:+:${CPLUS_INCLUDE_PATH}}" # Add local libraries to library path. -LIBRARY_PATH="$HOME/.local/lib${LIBRARY_PATH:+:${LIBRARY_PATH}}" +export LIBRARY_PATH="$HOME/.local/lib${LIBRARY_PATH:+:${LIBRARY_PATH}}" # Setting LIBRARY_PATH is for linking, setting LD_LIBRARY_PATH is for running -LD_LIBRARY_PATH="$LIBRARY_PATH" +export LD_LIBRARY_PATH="$LIBRARY_PATH" -export C_INCLUDE_PATH -export CPLUS_INCLUDE_PATH -export LIBRARY_PATH -export LD_LIBRARY_PATH -export MANPAGER -export MANWIDTH -export EDITOR=vim +export EDITOR=nvim export BAT_THEME=base16 # Fix less not rendering control characters with git-log on the Opp lab machines. export LESS=FRX diff --git a/stowdir/.local/bin/vim b/stowdir/.local/bin/vim new file mode 100755 index 0000000..1a20195 --- /dev/null +++ b/stowdir/.local/bin/vim @@ -0,0 +1,9 @@ +#!/bin/bash +if command -v nvim &>/dev/null; then + exec nvim "$@" +elif [[ -x /usr/bin/vim ]]; then + exec /usr/bin/vim "$@" +else + echo "vim shim: neither nvim nor /usr/bin/vim is installed" >&2 + exit 1 +fi From acb0e12054bd408955fd58a171f0a197b061ea3b Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 19:11:16 -0500 Subject: [PATCH 18/50] nvim: run stylua on nvim configs --- stowdir/.config/nvim/lua/config/clipboard.lua | 10 +++---- stowdir/.config/nvim/lua/config/editing.lua | 4 ++- stowdir/.config/nvim/lua/config/filetypes.lua | 4 ++- stowdir/.config/nvim/lua/config/history.lua | 4 ++- stowdir/.config/nvim/lua/config/spelling.lua | 6 ++-- stowdir/.config/nvim/lua/config/title.lua | 4 ++- stowdir/.config/nvim/lua/config/windowing.lua | 4 ++- .../.config/nvim/lua/plugins/telescope.lua | 30 ++++++++++++++----- stowdir/.config/nvim/stylua.toml | 3 ++ 9 files changed, 50 insertions(+), 19 deletions(-) create mode 100644 stowdir/.config/nvim/stylua.toml diff --git a/stowdir/.config/nvim/lua/config/clipboard.lua b/stowdir/.config/nvim/lua/config/clipboard.lua index eb3f026..8a9a91a 100644 --- a/stowdir/.config/nvim/lua/config/clipboard.lua +++ b/stowdir/.config/nvim/lua/config/clipboard.lua @@ -1,7 +1,7 @@ -- System-clipboard bindings via the `clip` script. By using `clip`, I get x11, wayland, and sshclip support -vim.keymap.set("i", "", [[=system('clip --paste')]], { silent = true }) -vim.keymap.set("i", "", [["cyy:call system('clip --copy', @c)]], { silent = true }) -vim.keymap.set("v", "", [["cy:call system('clip --copy', @c)]], { silent = true }) +vim.keymap.set("i", "", [[=system('clip --paste')]], { silent = true }) +vim.keymap.set("i", "", [["cyy:call system('clip --copy', @c)]], { silent = true }) +vim.keymap.set("v", "", [["cy:call system('clip --copy', @c)]], { silent = true }) vim.keymap.set("v", "", [[:let @c=system('clip --paste')gv"cP]], { silent = true }) -vim.keymap.set("n", "", [[:let @c=system('clip --paste')"cP]], { silent = true }) -vim.keymap.set("n", "", [["cyy:call system('clip --copy', @c)]], { silent = true }) +vim.keymap.set("n", "", [[:let @c=system('clip --paste')"cP]], { silent = true }) +vim.keymap.set("n", "", [["cyy:call system('clip --copy', @c)]], { silent = true }) diff --git a/stowdir/.config/nvim/lua/config/editing.lua b/stowdir/.config/nvim/lua/config/editing.lua index 96469fd..e82b69c 100644 --- a/stowdir/.config/nvim/lua/config/editing.lua +++ b/stowdir/.config/nvim/lua/config/editing.lua @@ -13,7 +13,9 @@ vim.opt.showmatch = true vim.api.nvim_create_autocmd("FileType", { group = vim.api.nvim_create_augroup("editing_gitcommit", { clear = true }), pattern = "gitcommit", - callback = function() vim.opt_local.colorcolumn = "72" end, + callback = function() + vim.opt_local.colorcolumn = "72" + end, }) -- Reselect visual block after indent. diff --git a/stowdir/.config/nvim/lua/config/filetypes.lua b/stowdir/.config/nvim/lua/config/filetypes.lua index 57da7f5..f213f71 100644 --- a/stowdir/.config/nvim/lua/config/filetypes.lua +++ b/stowdir/.config/nvim/lua/config/filetypes.lua @@ -43,5 +43,7 @@ vim.api.nvim_create_autocmd("FileType", { vim.api.nvim_create_autocmd("FileType", { group = group, pattern = "rust", - callback = function() vim.g.termdebugger = "rust-gdb" end, + callback = function() + vim.g.termdebugger = "rust-gdb" + end, }) diff --git a/stowdir/.config/nvim/lua/config/history.lua b/stowdir/.config/nvim/lua/config/history.lua index 5ec5073..e190357 100644 --- a/stowdir/.config/nvim/lua/config/history.lua +++ b/stowdir/.config/nvim/lua/config/history.lua @@ -12,5 +12,7 @@ vim.opt.shada = "!,'500,/5000,:5000,<500,s1000,h" vim.api.nvim_create_autocmd("FileType", { group = vim.api.nvim_create_augroup("history_disable_for_git", { clear = true }), pattern = { "gitcommit", "gitrebase" }, - callback = function() vim.opt_local.shada = "" end, + callback = function() + vim.opt_local.shada = "" + end, }) diff --git a/stowdir/.config/nvim/lua/config/spelling.lua b/stowdir/.config/nvim/lua/config/spelling.lua index e382a05..696f224 100644 --- a/stowdir/.config/nvim/lua/config/spelling.lua +++ b/stowdir/.config/nvim/lua/config/spelling.lua @@ -13,8 +13,10 @@ vim.keymap.set({ "n", "i" }, "", "setlocal spell! spell?") local function setup_spellfile() for _, add in ipairs(vim.fn.glob(spell_dir .. "/*.add", true, true)) do local spl = add .. ".spl" - if vim.fn.filereadable(add) == 1 - and (vim.fn.filereadable(spl) == 0 or vim.fn.getftime(add) > vim.fn.getftime(spl)) then + if + vim.fn.filereadable(add) == 1 + and (vim.fn.filereadable(spl) == 0 or vim.fn.getftime(add) > vim.fn.getftime(spl)) + then vim.cmd("silent mkspell! " .. vim.fn.fnameescape(add)) end end diff --git a/stowdir/.config/nvim/lua/config/title.lua b/stowdir/.config/nvim/lua/config/title.lua index 29773f3..72c85ad 100644 --- a/stowdir/.config/nvim/lua/config/title.lua +++ b/stowdir/.config/nvim/lua/config/title.lua @@ -4,5 +4,7 @@ vim.opt.titleold = "" vim.api.nvim_create_autocmd("VimLeave", { group = vim.api.nvim_create_augroup("title_clear_on_exit", { clear = true }), - callback = function() vim.opt.title = false end, + callback = function() + vim.opt.title = false + end, }) diff --git a/stowdir/.config/nvim/lua/config/windowing.lua b/stowdir/.config/nvim/lua/config/windowing.lua index fbdc512..b4c4379 100644 --- a/stowdir/.config/nvim/lua/config/windowing.lua +++ b/stowdir/.config/nvim/lua/config/windowing.lua @@ -2,7 +2,9 @@ vim.api.nvim_create_autocmd("WinEnter", { group = vim.api.nvim_create_augroup("windowing_exit_if_last", { clear = true }), callback = function() - if vim.fn.winnr("$") ~= 1 then return end + if vim.fn.winnr("$") ~= 1 then + return + end if vim.bo.buftype == "quickfix" then vim.bo.buftype = "nofile" vim.cmd("quit") diff --git a/stowdir/.config/nvim/lua/plugins/telescope.lua b/stowdir/.config/nvim/lua/plugins/telescope.lua index 978bb7a..ac4b2ae 100644 --- a/stowdir/.config/nvim/lua/plugins/telescope.lua +++ b/stowdir/.config/nvim/lua/plugins/telescope.lua @@ -7,12 +7,20 @@ return { }, cmd = { "Telescope", "Rg" }, keys = { - { "", "Telescope buffers", desc = "Telescope buffers" }, + { "", "Telescope buffers", desc = "Telescope buffers" }, { "", function() require("telescope.builtin").find_files({ - find_command = { "fd", "--type", "f", "--hidden", "--no-ignore", "--exclude", ".git" }, + find_command = { + "fd", + "--type", + "f", + "--hidden", + "--no-ignore", + "--exclude", + ".git", + }, }) end, desc = "Telescope find non-VCS files", @@ -26,11 +34,19 @@ return { end, desc = "Telescope find VCS files", }, - { "", "Telescope command_history", desc = "Telescope command history" }, - { "", "Telescope search_history", desc = "Telescope search history" }, - { "", "Telescope oldfiles", desc = "Telescope file history" }, - { "", "Telescope jumplist", desc = "Telescope jumps" }, - { "", "Telescope marks", desc = "Telescope marks" }, + { + "", + "Telescope command_history", + desc = "Telescope command history", + }, + { + "", + "Telescope search_history", + desc = "Telescope search history", + }, + { "", "Telescope oldfiles", desc = "Telescope file history" }, + { "", "Telescope jumplist", desc = "Telescope jumps" }, + { "", "Telescope marks", desc = "Telescope marks" }, }, config = function() require("telescope").setup({}) diff --git a/stowdir/.config/nvim/stylua.toml b/stowdir/.config/nvim/stylua.toml new file mode 100644 index 0000000..3e254d0 --- /dev/null +++ b/stowdir/.config/nvim/stylua.toml @@ -0,0 +1,3 @@ +column_width = 100 +indent_type = "Spaces" +indent_width = 4 From d5f6835a745846fd44e42a647e0645263cc4650c Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 19:20:31 -0500 Subject: [PATCH 19/50] nvim: LSP, linters, and formatters --- stowdir/.config/nvim/lazy-lock.json | 6 + .../.config/nvim/lua/config/diagnostics.lua | 5 + .../.config/nvim/lua/plugins/formatting.lua | 51 ++++++++ stowdir/.config/nvim/lua/plugins/linting.lua | 19 +++ stowdir/.config/nvim/lua/plugins/lsp.lua | 111 ++++++++++++++++++ 5 files changed, 192 insertions(+) create mode 100644 stowdir/.config/nvim/lua/config/diagnostics.lua create mode 100644 stowdir/.config/nvim/lua/plugins/formatting.lua create mode 100644 stowdir/.config/nvim/lua/plugins/linting.lua create mode 100644 stowdir/.config/nvim/lua/plugins/lsp.lua diff --git a/stowdir/.config/nvim/lazy-lock.json b/stowdir/.config/nvim/lazy-lock.json index d9248fc..cda9be2 100644 --- a/stowdir/.config/nvim/lazy-lock.json +++ b/stowdir/.config/nvim/lazy-lock.json @@ -1,5 +1,11 @@ { + "conform.nvim": { "branch": "master", "commit": "dca1a190aa85f9065979ef35802fb77131911106" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "0c2823e0418f3d9230ff8b201c976e84de1cb401" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" }, + "mason.nvim": { "branch": "main", "commit": "cb8445f8ce85d957416c106b780efd51c6298f89" }, + "nvim-lint": { "branch": "master", "commit": "eab58b48eb11d7745c11c505e0f3057165902461" }, + "nvim-lspconfig": { "branch": "master", "commit": "31026a13eefb20681124706a79fc1df6bf11ab27" }, "nvim-treesitter": { "branch": "master", "commit": "cf12346a3414fa1b06af75c79faebe7f76df080a" }, "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, diff --git a/stowdir/.config/nvim/lua/config/diagnostics.lua b/stowdir/.config/nvim/lua/config/diagnostics.lua new file mode 100644 index 0000000..248c127 --- /dev/null +++ b/stowdir/.config/nvim/lua/config/diagnostics.lua @@ -0,0 +1,5 @@ +vim.diagnostic.config({ + virtual_text = { current_line = true }, + severity_sort = true, + float = { border = "none", source = true }, +}) diff --git a/stowdir/.config/nvim/lua/plugins/formatting.lua b/stowdir/.config/nvim/lua/plugins/formatting.lua new file mode 100644 index 0000000..2b1d221 --- /dev/null +++ b/stowdir/.config/nvim/lua/plugins/formatting.lua @@ -0,0 +1,51 @@ +return { + { + "stevearc/conform.nvim", + cmd = { "ConformInfo" }, + keys = { + { + "", + function() + require("conform").format({ async = true, lsp_format = "fallback" }) + end, + mode = { "n", "i" }, + desc = "Format buffer", + }, + }, + opts = { + formatters_by_ft = { + c = { "clang-format" }, + cmake = { "cmake_format" }, + cpp = { "clang-format" }, + css = { "prettier" }, + html = { "prettier" }, + javascript = { "prettier" }, + json = { "jq" }, + lua = { "stylua" }, + markdown = { "dprint" }, + python = { "ruff_format" }, + rust = { "rustfmt" }, + sh = { "shfmt" }, + toml = { "dprint" }, + ["_"] = { "trim_whitespace", "trim_newlines" }, + }, + formatters = { + jq = { prepend_args = { "--indent", "4" } }, + prettier = { + prepend_args = { + "--print-width", + "120", + "--prose-wrap", + "always", + "--tab-width", + "4", + "--html-whitespace-sensitivity", + "css", + }, + }, + ruff_format = { prepend_args = { "--line-length=100" } }, + shfmt = { prepend_args = { "--indent", "4" } }, + }, + }, + }, +} diff --git a/stowdir/.config/nvim/lua/plugins/linting.lua b/stowdir/.config/nvim/lua/plugins/linting.lua new file mode 100644 index 0000000..94cc337 --- /dev/null +++ b/stowdir/.config/nvim/lua/plugins/linting.lua @@ -0,0 +1,19 @@ +return { + { + "mfussenegger/nvim-lint", + event = { "BufReadPost", "BufWritePost", "InsertLeave" }, + config = function() + require("lint").linters_by_ft = { + dockerfile = { "hadolint" }, + gitcommit = { "gitlint" }, + } + + vim.api.nvim_create_autocmd({ "BufReadPost", "BufWritePost", "InsertLeave" }, { + group = vim.api.nvim_create_augroup("nvim_lint_trigger", { clear = true }), + callback = function() + require("lint").try_lint() + end, + }) + end, + }, +} diff --git a/stowdir/.config/nvim/lua/plugins/lsp.lua b/stowdir/.config/nvim/lua/plugins/lsp.lua new file mode 100644 index 0000000..5cb4451 --- /dev/null +++ b/stowdir/.config/nvim/lua/plugins/lsp.lua @@ -0,0 +1,111 @@ +return { + { + "neovim/nvim-lspconfig", + dependencies = { + "williamboman/mason.nvim", + "williamboman/mason-lspconfig.nvim", + }, + event = { "BufReadPost", "BufNewFile" }, + config = function() + require("mason").setup() + require("mason-lspconfig").setup({ + ensure_installed = { + "basedpyright", + "bashls", + "clangd", + "lua_ls", + "neocmake", + "ruff", + }, + }) + + vim.lsp.config("clangd", { + cmd = { + "clangd", + "--background-index", + "--header-insertion=iwyu", + "--pch-storage=memory", + "--completion-style=bundled", + "--compute-dead", + "--query-driver=/opt/**/*-linux-*,/usr/bin/c++,/usr/bin/cc,/usr/bin/gcc,/usr/bin/g++", + "-j=4", + "--clang-tidy", + }, + }) + vim.lsp.config("lua_ls", { + settings = { + Lua = { + runtime = { version = "LuaJIT" }, + diagnostics = { globals = { "vim" } }, + workspace = { + library = vim.api.nvim_get_runtime_file("", true), + checkThirdParty = false, + }, + telemetry = { enable = false }, + }, + }, + }) + vim.lsp.config("rust_analyzer", { + settings = { + ["rust-analyzer"] = { + cargo = { cfgs = { "test" }, features = "all" }, + procMacro = { enable = true }, + check = { command = "clippy" }, + diagnostics = { disabled = { "unresolved-proc-macro" } }, + }, + }, + }) + vim.lsp.enable({ + "basedpyright", + "bashls", + "clangd", + "lua_ls", + "neocmake", + "ruff", + "rust_analyzer", + }) + + vim.api.nvim_create_autocmd("LspAttach", { + group = vim.api.nvim_create_augroup("lsp_keymaps", { clear = true }), + callback = function(args) + local buf = args.buf + local map = function(mode, lhs, rhs, desc) + vim.keymap.set(mode, lhs, rhs, { buffer = buf, desc = desc }) + end + map("n", "gd", vim.lsp.buf.definition, "LSP definition") + map("n", "gD", vim.lsp.buf.type_definition, "LSP type definition") + map("n", "gh", vim.lsp.buf.hover, "LSP hover") + map({ "n", "i" }, "", vim.lsp.buf.rename, "LSP rename") + map({ "n", "i" }, "", function() + require("telescope.builtin").lsp_references() + end, "LSP references") + map("n", "]p", function() + vim.diagnostic.jump({ count = 1 }) + end, "Next diagnostic") + map("n", "[p", function() + vim.diagnostic.jump({ count = -1 }) + end, "Prev diagnostic") + + local client = vim.lsp.get_client_by_id(args.data.client_id) + if client and client.name == "clangd" then + map({ "n", "i" }, "", "LspClangdSwitchSourceHeader", "Switch source/header") + end + end, + }) + end, + }, + { + "WhoIsSethDaniel/mason-tool-installer.nvim", + dependencies = { "williamboman/mason.nvim" }, + opts = { + ensure_installed = { + "clang-format", + "cmakelang", + "gitlint", + "hadolint", + "prettier", + "stylua", + }, + }, + }, +} From 63a00dcd3e2067290398a695febc1dbd4792f416 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 19:34:06 -0500 Subject: [PATCH 20/50] nvim: statusline --- stowdir/.config/nvim/lazy-lock.json | 1 + .../.config/nvim/lua/plugins/statusline.lua | 33 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 stowdir/.config/nvim/lua/plugins/statusline.lua diff --git a/stowdir/.config/nvim/lazy-lock.json b/stowdir/.config/nvim/lazy-lock.json index cda9be2..84fe4ea 100644 --- a/stowdir/.config/nvim/lazy-lock.json +++ b/stowdir/.config/nvim/lazy-lock.json @@ -1,6 +1,7 @@ { "conform.nvim": { "branch": "master", "commit": "dca1a190aa85f9065979ef35802fb77131911106" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, + "lualine.nvim": { "branch": "master", "commit": "131a558e13f9f28b15cd235557150ccb23f89286" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "0c2823e0418f3d9230ff8b201c976e84de1cb401" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" }, "mason.nvim": { "branch": "main", "commit": "cb8445f8ce85d957416c106b780efd51c6298f89" }, diff --git a/stowdir/.config/nvim/lua/plugins/statusline.lua b/stowdir/.config/nvim/lua/plugins/statusline.lua new file mode 100644 index 0000000..12a9c85 --- /dev/null +++ b/stowdir/.config/nvim/lua/plugins/statusline.lua @@ -0,0 +1,33 @@ +return { + { + "nvim-lualine/lualine.nvim", + event = "VeryLazy", + opts = { + options = { + icons_enabled = false, + theme = "ayu_dark", + component_separators = { left = "|", right = "|" }, + section_separators = { left = "", right = "" }, + }, + sections = { + lualine_a = { "mode" }, + lualine_b = { + "branch", + "diff", + { + "diagnostics", + symbols = { error = "✗ ", warn = "⚠ ", info = "ⓘ ", hint = "? " }, + }, + }, + lualine_c = { "filename" }, + lualine_x = { vim.lsp.status, "encoding", "filetype" }, + lualine_y = { "progress" }, + lualine_z = { "location" }, + }, + }, + init = function() + -- lualine shows the mode; nvim's default echo-area mode line is redundant. + vim.opt.showmode = false + end, + }, +} From 0cf0f5f2a4e99ddd34d9d55b6bc0fc21ab7bc01e Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 19:49:22 -0500 Subject: [PATCH 21/50] nvim: completion --- stowdir/.config/nvim/lazy-lock.json | 2 + .../.config/nvim/lua/plugins/completion.lua | 66 +++++++++++++++++++ stowdir/.config/nvim/lua/plugins/copilot.lua | 41 ++++++++++++ 3 files changed, 109 insertions(+) create mode 100644 stowdir/.config/nvim/lua/plugins/completion.lua create mode 100644 stowdir/.config/nvim/lua/plugins/copilot.lua diff --git a/stowdir/.config/nvim/lazy-lock.json b/stowdir/.config/nvim/lazy-lock.json index 84fe4ea..35bea27 100644 --- a/stowdir/.config/nvim/lazy-lock.json +++ b/stowdir/.config/nvim/lazy-lock.json @@ -1,5 +1,7 @@ { + "blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" }, "conform.nvim": { "branch": "master", "commit": "dca1a190aa85f9065979ef35802fb77131911106" }, + "copilot.lua": { "branch": "master", "commit": "78c638293f0ea6a2245eca46e9933ee271792d7e" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, "lualine.nvim": { "branch": "master", "commit": "131a558e13f9f28b15cd235557150ccb23f89286" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "0c2823e0418f3d9230ff8b201c976e84de1cb401" }, diff --git a/stowdir/.config/nvim/lua/plugins/completion.lua b/stowdir/.config/nvim/lua/plugins/completion.lua new file mode 100644 index 0000000..c13b3cd --- /dev/null +++ b/stowdir/.config/nvim/lua/plugins/completion.lua @@ -0,0 +1,66 @@ +return { + { + "saghen/blink.cmp", + version = "1.*", + opts = { + keymap = { + preset = "enter", + [""] = { + function() + local ok, copilot = pcall(require, "copilot.suggestion") + if ok and copilot.is_visible() then + copilot.accept() + return true + end + end, + "snippet_forward", + "fallback", + }, + }, + sources = { + default = { "buffer", "lsp", "path" }, + }, + signature = { enabled = true }, + appearance = { + kind_icons = { + Class = "◇", + Color = "●", + Constant = "π", + Constructor = "⊕", + Enum = "≡", + EnumMember = "·", + Event = "!", + Field = "·", + File = "▤", + Folder = "▥", + Function = "ƒ", + Interface = "◈", + Keyword = "★", + Method = "ƒ", + Module = "▦", + Operator = "⊕", + Property = "◦", + Reference = "→", + Snippet = "◊", + Struct = "◆", + Text = "T", + TypeParameter = "τ", + Unit = "⊡", + Value = "◉", + Variable = "ν", + }, + }, + completion = { + menu = { + draw = { + columns = { + { "kind_icon" }, + { "label", "label_description", gap = 1 }, + { "kind" }, + }, + }, + }, + }, + }, + }, +} diff --git a/stowdir/.config/nvim/lua/plugins/copilot.lua b/stowdir/.config/nvim/lua/plugins/copilot.lua new file mode 100644 index 0000000..8acd443 --- /dev/null +++ b/stowdir/.config/nvim/lua/plugins/copilot.lua @@ -0,0 +1,41 @@ +return { + { + "zbirenbaum/copilot.lua", + cmd = "Copilot", + event = "InsertEnter", + opts = { + suggestion = { + enabled = true, + auto_trigger = true, + keymap = { + accept_word = "", + dismiss = "", + }, + }, + panel = { enabled = false }, + filetypes = { + ["*"] = true, + text = false, + }, + should_attach = function(_, source) + local name = vim.fs.basename(source.bufname or vim.api.nvim_buf_get_name(0)) + local secret_patterns = { + "%.env$", + "%.env%.", + "%.pem$", + "%.key$", + "^id_rsa", + "^id_ed25519", + "^id_ecdsa", + "credentials", + } + for _, pat in ipairs(secret_patterns) do + if name:match(pat) then + return false + end + end + return true + end, + }, + }, +} From 1a0a827da1d3f737e538211ac7586a91b3354306 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 19:52:12 -0500 Subject: [PATCH 22/50] vim|nvim: fix paste indentation in insert mode --- stowdir/.config/nvim/lua/config/clipboard.lua | 2 +- stowdir/.vim/vimrc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stowdir/.config/nvim/lua/config/clipboard.lua b/stowdir/.config/nvim/lua/config/clipboard.lua index 8a9a91a..8cb8817 100644 --- a/stowdir/.config/nvim/lua/config/clipboard.lua +++ b/stowdir/.config/nvim/lua/config/clipboard.lua @@ -1,5 +1,5 @@ -- System-clipboard bindings via the `clip` script. By using `clip`, I get x11, wayland, and sshclip support -vim.keymap.set("i", "", [[=system('clip --paste')]], { silent = true }) +vim.keymap.set("i", "", [[=system('clip --paste')]], { silent = true }) vim.keymap.set("i", "", [["cyy:call system('clip --copy', @c)]], { silent = true }) vim.keymap.set("v", "", [["cy:call system('clip --copy', @c)]], { silent = true }) vim.keymap.set("v", "", [[:let @c=system('clip --paste')gv"cP]], { silent = true }) diff --git a/stowdir/.vim/vimrc b/stowdir/.vim/vimrc index ba6892a..0824949 100644 --- a/stowdir/.vim/vimrc +++ b/stowdir/.vim/vimrc @@ -686,7 +686,7 @@ vnoremap > >gv " These keybinds use the `clip` script for system clipboard integration. " `clip` supports X11, Wayland, and local<->remote sshclip. -inoremap =system('clip --paste') +inoremap =system('clip --paste') inoremap "cyy:call system('clip --copy', @c) vnoremap "cy:call system('clip --copy', @c) vnoremap :let @c=system('clip --paste')gv"cP From 736c48338ae1429dcc24cd9e9668c60e57bae4dc Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 20:30:39 -0500 Subject: [PATCH 23/50] nvim: Surround and textobjects --- stowdir/.config/nvim/lazy-lock.json | 2 + stowdir/.config/nvim/lua/plugins/editing.lua | 8 ++++ .../.config/nvim/lua/plugins/treesitter.lua | 47 ++++++++++++++++++- 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 stowdir/.config/nvim/lua/plugins/editing.lua diff --git a/stowdir/.config/nvim/lazy-lock.json b/stowdir/.config/nvim/lazy-lock.json index 35bea27..3c8f66c 100644 --- a/stowdir/.config/nvim/lazy-lock.json +++ b/stowdir/.config/nvim/lazy-lock.json @@ -9,7 +9,9 @@ "mason.nvim": { "branch": "main", "commit": "cb8445f8ce85d957416c106b780efd51c6298f89" }, "nvim-lint": { "branch": "master", "commit": "eab58b48eb11d7745c11c505e0f3057165902461" }, "nvim-lspconfig": { "branch": "master", "commit": "31026a13eefb20681124706a79fc1df6bf11ab27" }, + "nvim-surround": { "branch": "main", "commit": "2e93e154de9ff326def6480a4358bfc149d5da2c" }, "nvim-treesitter": { "branch": "master", "commit": "cf12346a3414fa1b06af75c79faebe7f76df080a" }, + "nvim-treesitter-textobjects": { "branch": "main", "commit": "851e865342e5a4cb1ae23d31caf6e991e1c99f1e" }, "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, "telescope-undo.nvim": { "branch": "main", "commit": "928d0c2dc9606e01e2cc547196f48d2eaecf58e5" }, diff --git a/stowdir/.config/nvim/lua/plugins/editing.lua b/stowdir/.config/nvim/lua/plugins/editing.lua new file mode 100644 index 0000000..defda54 --- /dev/null +++ b/stowdir/.config/nvim/lua/plugins/editing.lua @@ -0,0 +1,8 @@ +return { + { + "kylechui/nvim-surround", + version = "*", + event = "VeryLazy", + opts = {}, + }, +} diff --git a/stowdir/.config/nvim/lua/plugins/treesitter.lua b/stowdir/.config/nvim/lua/plugins/treesitter.lua index 937e141..9b99e69 100644 --- a/stowdir/.config/nvim/lua/plugins/treesitter.lua +++ b/stowdir/.config/nvim/lua/plugins/treesitter.lua @@ -4,6 +4,7 @@ return { branch = "master", build = ":TSUpdate", event = { "BufReadPost", "BufNewFile" }, + dependencies = { "nvim-treesitter/nvim-treesitter-textobjects" }, config = function() require("nvim-treesitter.configs").setup({ ensure_installed = { @@ -19,7 +20,6 @@ return { "html", "javascript", "json", - "latex", "lua", "markdown", "markdown_inline", @@ -30,10 +30,55 @@ return { "typescript", "vim", "vimdoc", + "xml", "yaml", }, highlight = { enable = true }, indent = { enable = true }, + textobjects = { + select = { + enable = true, + lookahead = true, + keymaps = { + ["ac"] = "@comment.outer", + ["ic"] = "@comment.outer", + ["af"] = "@function.outer", + ["if"] = "@function.inner", + ["aC"] = "@class.outer", + ["iC"] = "@class.inner", + ["aa"] = "@parameter.outer", + ["ia"] = "@parameter.inner", + ["ao"] = "@conditional.outer", + ["io"] = "@conditional.inner", + ["al"] = "@loop.outer", + ["il"] = "@loop.inner", + }, + }, + move = { + enable = true, + set_jumps = true, + goto_next_start = { + ["]m"] = "@function.outer", + ["]]"] = "@class.outer", + ["]a"] = "@parameter.inner", + ["]l"] = "@loop.outer", + }, + goto_next_end = { + ["]M"] = "@function.outer", + ["]["] = "@class.outer", + }, + goto_previous_start = { + ["[m"] = "@function.outer", + ["[["] = "@class.outer", + ["[a"] = "@parameter.inner", + ["[l"] = "@loop.outer", + }, + goto_previous_end = { + ["[M"] = "@function.outer", + ["[]"] = "@class.outer", + }, + }, + }, }) end, }, From df47404d67a45e13d8642b6dfb8bf3d47b823eb4 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 20:40:34 -0500 Subject: [PATCH 24/50] nvim: vim-eunuch --- stowdir/.config/nvim/lazy-lock.json | 3 ++- stowdir/.config/nvim/lua/plugins/editing.lua | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/stowdir/.config/nvim/lazy-lock.json b/stowdir/.config/nvim/lazy-lock.json index 3c8f66c..bd4687b 100644 --- a/stowdir/.config/nvim/lazy-lock.json +++ b/stowdir/.config/nvim/lazy-lock.json @@ -15,5 +15,6 @@ "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, "telescope-undo.nvim": { "branch": "main", "commit": "928d0c2dc9606e01e2cc547196f48d2eaecf58e5" }, - "telescope.nvim": { "branch": "master", "commit": "ec009610d5d259ec59a6edf0219ef3f7ee4732e5" } + "telescope.nvim": { "branch": "master", "commit": "ec009610d5d259ec59a6edf0219ef3f7ee4732e5" }, + "vim-eunuch": { "branch": "master", "commit": "e86bb794a1c10a2edac130feb0ea590a00d03f1e" } } diff --git a/stowdir/.config/nvim/lua/plugins/editing.lua b/stowdir/.config/nvim/lua/plugins/editing.lua index defda54..fb722dd 100644 --- a/stowdir/.config/nvim/lua/plugins/editing.lua +++ b/stowdir/.config/nvim/lua/plugins/editing.lua @@ -5,4 +5,8 @@ return { event = "VeryLazy", opts = {}, }, + { + "tpope/vim-eunuch", + cmd = { "Move", "Rename", "Delete", "Chmod", "SudoWrite", "Mkdir", "Wall", "SudoEdit" }, + }, } From 4c4478f33f6de98c408fd57ef649ac9d8e97166e Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 20:45:10 -0500 Subject: [PATCH 25/50] nvim: Add flash.nvim --- stowdir/.config/nvim/lazy-lock.json | 1 + stowdir/.config/nvim/lua/plugins/editing.lua | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/stowdir/.config/nvim/lazy-lock.json b/stowdir/.config/nvim/lazy-lock.json index bd4687b..ebd545d 100644 --- a/stowdir/.config/nvim/lazy-lock.json +++ b/stowdir/.config/nvim/lazy-lock.json @@ -2,6 +2,7 @@ "blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" }, "conform.nvim": { "branch": "master", "commit": "dca1a190aa85f9065979ef35802fb77131911106" }, "copilot.lua": { "branch": "master", "commit": "78c638293f0ea6a2245eca46e9933ee271792d7e" }, + "flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, "lualine.nvim": { "branch": "master", "commit": "131a558e13f9f28b15cd235557150ccb23f89286" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "0c2823e0418f3d9230ff8b201c976e84de1cb401" }, diff --git a/stowdir/.config/nvim/lua/plugins/editing.lua b/stowdir/.config/nvim/lua/plugins/editing.lua index fb722dd..4bac4c0 100644 --- a/stowdir/.config/nvim/lua/plugins/editing.lua +++ b/stowdir/.config/nvim/lua/plugins/editing.lua @@ -9,4 +9,16 @@ return { "tpope/vim-eunuch", cmd = { "Move", "Rename", "Delete", "Chmod", "SudoWrite", "Mkdir", "Wall", "SudoEdit" }, }, + { + "folke/flash.nvim", + event = "VeryLazy", + opts = { + modes = { + char = { + jump_labels = false, + }, + search = { enabled = false }, + }, + }, + }, } From 876a39aad9ec4c20c5ef9e6dbef213a6f6dc15cb Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 20:52:20 -0500 Subject: [PATCH 26/50] nvim: git --- stowdir/.config/nvim/lazy-lock.json | 5 +++- stowdir/.config/nvim/lua/plugins/editing.lua | 5 ++++ stowdir/.config/nvim/lua/plugins/git.lua | 24 ++++++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 stowdir/.config/nvim/lua/plugins/git.lua diff --git a/stowdir/.config/nvim/lazy-lock.json b/stowdir/.config/nvim/lazy-lock.json index ebd545d..e6f56c1 100644 --- a/stowdir/.config/nvim/lazy-lock.json +++ b/stowdir/.config/nvim/lazy-lock.json @@ -3,8 +3,10 @@ "conform.nvim": { "branch": "master", "commit": "dca1a190aa85f9065979ef35802fb77131911106" }, "copilot.lua": { "branch": "master", "commit": "78c638293f0ea6a2245eca46e9933ee271792d7e" }, "flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" }, + "gitsigns.nvim": { "branch": "main", "commit": "dd3f588bacbeb041be6facf1742e42097f62165d" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, "lualine.nvim": { "branch": "master", "commit": "131a558e13f9f28b15cd235557150ccb23f89286" }, + "marks.nvim": { "branch": "master", "commit": "f353e8c08c50f39e99a9ed474172df7eddd89b72" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "0c2823e0418f3d9230ff8b201c976e84de1cb401" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" }, "mason.nvim": { "branch": "main", "commit": "cb8445f8ce85d957416c106b780efd51c6298f89" }, @@ -17,5 +19,6 @@ "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, "telescope-undo.nvim": { "branch": "main", "commit": "928d0c2dc9606e01e2cc547196f48d2eaecf58e5" }, "telescope.nvim": { "branch": "master", "commit": "ec009610d5d259ec59a6edf0219ef3f7ee4732e5" }, - "vim-eunuch": { "branch": "master", "commit": "e86bb794a1c10a2edac130feb0ea590a00d03f1e" } + "vim-eunuch": { "branch": "master", "commit": "e86bb794a1c10a2edac130feb0ea590a00d03f1e" }, + "vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" } } diff --git a/stowdir/.config/nvim/lua/plugins/editing.lua b/stowdir/.config/nvim/lua/plugins/editing.lua index 4bac4c0..e1d4dd3 100644 --- a/stowdir/.config/nvim/lua/plugins/editing.lua +++ b/stowdir/.config/nvim/lua/plugins/editing.lua @@ -21,4 +21,9 @@ return { }, }, }, + { + "chentoast/marks.nvim", + event = "VeryLazy", + opts = {}, + }, } diff --git a/stowdir/.config/nvim/lua/plugins/git.lua b/stowdir/.config/nvim/lua/plugins/git.lua new file mode 100644 index 0000000..1f18a57 --- /dev/null +++ b/stowdir/.config/nvim/lua/plugins/git.lua @@ -0,0 +1,24 @@ +return { + { + "lewis6991/gitsigns.nvim", + event = { "BufReadPost", "BufNewFile" }, + opts = { + signs = { + add = { text = "+" }, + change = { text = "~" }, + delete = { text = "_" }, + topdelete = { text = "‾" }, + changedelete = { text = "~" }, + }, + on_attach = function(bufnr) + local gs = require("gitsigns") + vim.keymap.set("n", "]c", function() gs.nav_hunk("next") end, { buffer = bufnr, desc = "Next hunk" }) + vim.keymap.set("n", "[c", function() gs.nav_hunk("prev") end, { buffer = bufnr, desc = "Prev hunk" }) + end, + }, + }, + { + "tpope/vim-fugitive", + cmd = { "G", "Git", "Gdiff", "Gdiffsplit", "Gvdiffsplit", "Gblame", "Gread", "Gwrite", "Gedit", "GBrowse" }, + }, +} From 799afe9ae291fbfcf1cd62564b3d64dcc55afd1f Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 20:59:51 -0500 Subject: [PATCH 27/50] nvim: Add vim-tmux-navigator --- stowdir/.config/nvim/lazy-lock.json | 3 ++- stowdir/.config/nvim/lua/plugins/editing.lua | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/stowdir/.config/nvim/lazy-lock.json b/stowdir/.config/nvim/lazy-lock.json index e6f56c1..f2ba4bb 100644 --- a/stowdir/.config/nvim/lazy-lock.json +++ b/stowdir/.config/nvim/lazy-lock.json @@ -20,5 +20,6 @@ "telescope-undo.nvim": { "branch": "main", "commit": "928d0c2dc9606e01e2cc547196f48d2eaecf58e5" }, "telescope.nvim": { "branch": "master", "commit": "ec009610d5d259ec59a6edf0219ef3f7ee4732e5" }, "vim-eunuch": { "branch": "master", "commit": "e86bb794a1c10a2edac130feb0ea590a00d03f1e" }, - "vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" } + "vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" }, + "vim-tmux-navigator": { "branch": "master", "commit": "e41c431a0c7b7388ae7ba341f01a0d217eb3a432" } } diff --git a/stowdir/.config/nvim/lua/plugins/editing.lua b/stowdir/.config/nvim/lua/plugins/editing.lua index e1d4dd3..c73c853 100644 --- a/stowdir/.config/nvim/lua/plugins/editing.lua +++ b/stowdir/.config/nvim/lua/plugins/editing.lua @@ -26,4 +26,21 @@ return { event = "VeryLazy", opts = {}, }, + { + "christoomey/vim-tmux-navigator", + cmd = { + "TmuxNavigateLeft", + "TmuxNavigateDown", + "TmuxNavigateUp", + "TmuxNavigateRight", + "TmuxNavigatePrevious", + }, + keys = { + { "", "TmuxNavigateLeft", desc = "Tmux/win left" }, + { "", "TmuxNavigateDown", desc = "Tmux/win down" }, + { "", "TmuxNavigateUp", desc = "Tmux/win up" }, + { "", "TmuxNavigateRight", desc = "Tmux/win right" }, + { "", "TmuxNavigatePrevious", desc = "Tmux/win previous" }, + }, + }, } From fb63cacaa1e8d0c889cd63ef7269d9f36c9060c1 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 21:20:17 -0500 Subject: [PATCH 28/50] nvim: snippets --- stowdir/.config/nvim/lazy-lock.json | 2 + .../.config/nvim/lua/plugins/completion.lua | 4 +- stowdir/.config/nvim/lua/plugins/snippets.lua | 14 +++++ stowdir/.config/nvim/snippets/python.snippets | 38 +++++++++++++ stowdir/.config/nvim/snippets/sh.snippets | 57 +++++++++++++++++++ 5 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 stowdir/.config/nvim/lua/plugins/snippets.lua create mode 100644 stowdir/.config/nvim/snippets/python.snippets create mode 100644 stowdir/.config/nvim/snippets/sh.snippets diff --git a/stowdir/.config/nvim/lazy-lock.json b/stowdir/.config/nvim/lazy-lock.json index f2ba4bb..78feaa5 100644 --- a/stowdir/.config/nvim/lazy-lock.json +++ b/stowdir/.config/nvim/lazy-lock.json @@ -1,8 +1,10 @@ { + "LuaSnip": { "branch": "master", "commit": "642b0c595e11608b4c18219e93b88d7637af27bc" }, "blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" }, "conform.nvim": { "branch": "master", "commit": "dca1a190aa85f9065979ef35802fb77131911106" }, "copilot.lua": { "branch": "master", "commit": "78c638293f0ea6a2245eca46e9933ee271792d7e" }, "flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" }, + "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, "gitsigns.nvim": { "branch": "main", "commit": "dd3f588bacbeb041be6facf1742e42097f62165d" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, "lualine.nvim": { "branch": "master", "commit": "131a558e13f9f28b15cd235557150ccb23f89286" }, diff --git a/stowdir/.config/nvim/lua/plugins/completion.lua b/stowdir/.config/nvim/lua/plugins/completion.lua index c13b3cd..d1f68aa 100644 --- a/stowdir/.config/nvim/lua/plugins/completion.lua +++ b/stowdir/.config/nvim/lua/plugins/completion.lua @@ -2,7 +2,9 @@ return { { "saghen/blink.cmp", version = "1.*", + dependencies = { "L3MON4D3/LuaSnip" }, opts = { + snippets = { preset = "luasnip" }, keymap = { preset = "enter", [""] = { @@ -18,7 +20,7 @@ return { }, }, sources = { - default = { "buffer", "lsp", "path" }, + default = { "buffer", "lsp", "path", "snippets" }, }, signature = { enabled = true }, appearance = { diff --git a/stowdir/.config/nvim/lua/plugins/snippets.lua b/stowdir/.config/nvim/lua/plugins/snippets.lua new file mode 100644 index 0000000..6008212 --- /dev/null +++ b/stowdir/.config/nvim/lua/plugins/snippets.lua @@ -0,0 +1,14 @@ +return { + { + "L3MON4D3/LuaSnip", + version = "v2.*", + build = "make install_jsregexp", + dependencies = { "rafamadriz/friendly-snippets" }, + config = function() + require("luasnip.loaders.from_vscode").lazy_load() + require("luasnip.loaders.from_snipmate").lazy_load({ + paths = { vim.fn.stdpath("config") .. "/snippets" }, + }) + end, + }, +} diff --git a/stowdir/.config/nvim/snippets/python.snippets b/stowdir/.config/nvim/snippets/python.snippets new file mode 100644 index 0000000..b983988 --- /dev/null +++ b/stowdir/.config/nvim/snippets/python.snippets @@ -0,0 +1,38 @@ +snippet script "Boilerplate for a new script" + #!/usr/bin/env python3 + """${1:Script docstring.}""" + import argparse + import logging + import sys + + def parse_args(): + parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) + parser.add_argument("--log-level", "-l", type=str, default="INFO", choices=["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"], help="Set the logging output level. Defaults to INFO.",) + ${2:group = parser.add_argument_group() + group.add_argument("--input", "-i", type=argparse.FileType("r"), default=sys.stdin, help="${3:Script input. Defaults to stdin.}",) + group.add_argument("--output", "-o", type=argparse.FileType("w"), default=sys.stdout, help="${4:Script output. Defaults to stdout.}",)} + + return parser.parse_args() + + + def main(args): + pass + + + if __name__ == "__main__": + args = parse_args() + fmt = "%(asctime)s %(module)s %(levelname)s: %(message)s" + logging.basicConfig( + format=fmt, + datefmt="%Y-%m-%dT%H:%M:%S%z", + level=args.log_level, + stream=sys.stderr, + ) + # Color log output if possible, because I'm a sucker + try: + import coloredlogs + + coloredlogs.install(fmt=fmt, level=args.log_level, datefmt="%Y-%m-%dT%H:%M:%S%z") + except ImportError: + pass + main(args) diff --git a/stowdir/.config/nvim/snippets/sh.snippets b/stowdir/.config/nvim/snippets/sh.snippets new file mode 100644 index 0000000..771ee35 --- /dev/null +++ b/stowdir/.config/nvim/snippets/sh.snippets @@ -0,0 +1,57 @@ +snippet set "Safety settings" + set -o errexit + set -o pipefail + set -o nounset + set -o noclobber + +snippet script "Bash script template" + #!/bin/bash + set -o errexit + set -o pipefail + set -o nounset + set -o noclobber + + RED="\\033[31m" + GREEN="\\033[32m" + BLUE="\\033[34m" + RESET="\\033[0m" + + debug() { + echo -e "\${BLUE}DEBUG:\${RESET} \$*" >&2 + } + + info() { + echo -e "\${GREEN}INFO:\${RESET} \$*" >&2 + } + + error() { + echo -e "\${RED}ERROR:\${RESET} \$*" >&2 + } + + usage() { + echo "Usage: \$0 [--help]" + echo + echo " --help, -h Show this help and exit" + } + + main() { + while [[ \$# -gt 0 ]]; do + case "\$1" in + --help | -h) + usage + exit 0 + ;; + -*) + error "Unexpected option: '\$1'" + exit 1 + ;; + *) + error "Unexpected positional argument: '\$1'" + exit 1 + ;; + esac + shift + done + } + + main "\$@" From 74c79796044e1aa8eb2ef26a5a4949e903824b64 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 21:29:07 -0500 Subject: [PATCH 29/50] nvim: Add more filetypes --- stowdir/.config/nvim/lazy-lock.json | 2 ++ stowdir/.config/nvim/lua/plugins/filetypes.lua | 10 ++++++++++ stowdir/.config/nvim/lua/plugins/treesitter.lua | 2 ++ 3 files changed, 14 insertions(+) create mode 100644 stowdir/.config/nvim/lua/plugins/filetypes.lua diff --git a/stowdir/.config/nvim/lazy-lock.json b/stowdir/.config/nvim/lazy-lock.json index 78feaa5..d0aa881 100644 --- a/stowdir/.config/nvim/lazy-lock.json +++ b/stowdir/.config/nvim/lazy-lock.json @@ -21,7 +21,9 @@ "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, "telescope-undo.nvim": { "branch": "main", "commit": "928d0c2dc9606e01e2cc547196f48d2eaecf58e5" }, "telescope.nvim": { "branch": "master", "commit": "ec009610d5d259ec59a6edf0219ef3f7ee4732e5" }, + "vim-bitbake": { "branch": "master", "commit": "e75f8ea12b4a0bcfe46c564a3a78ff7361b0a1c6" }, "vim-eunuch": { "branch": "master", "commit": "e86bb794a1c10a2edac130feb0ea590a00d03f1e" }, + "vim-flatbuffers": { "branch": "master", "commit": "ecd75c33576d982f3c83545dff7b3c9245285e75" }, "vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" }, "vim-tmux-navigator": { "branch": "master", "commit": "e41c431a0c7b7388ae7ba341f01a0d217eb3a432" } } diff --git a/stowdir/.config/nvim/lua/plugins/filetypes.lua b/stowdir/.config/nvim/lua/plugins/filetypes.lua new file mode 100644 index 0000000..29ed7f0 --- /dev/null +++ b/stowdir/.config/nvim/lua/plugins/filetypes.lua @@ -0,0 +1,10 @@ +return { + { + "dcharbon/vim-flatbuffers", + ft = "fbs", + }, + { + "kergoth/vim-bitbake", + ft = { "bitbake", "bb", "bbappend", "bbclass" }, + }, +} diff --git a/stowdir/.config/nvim/lua/plugins/treesitter.lua b/stowdir/.config/nvim/lua/plugins/treesitter.lua index 9b99e69..83318c1 100644 --- a/stowdir/.config/nvim/lua/plugins/treesitter.lua +++ b/stowdir/.config/nvim/lua/plugins/treesitter.lua @@ -9,6 +9,7 @@ return { require("nvim-treesitter.configs").setup({ ensure_installed = { "bash", + "bitbake", "c", "cmake", "cpp", @@ -23,6 +24,7 @@ return { "lua", "markdown", "markdown_inline", + "proto", "python", "rust", "toml", From c3708bdf156580599fd25313c86857ecf4709565 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 21:49:46 -0500 Subject: [PATCH 30/50] nvim: color scheme --- .../.config/nvim/lua/config/highlights.lua | 76 +++++++++++++++++++ .../.config/nvim/lua/plugins/telescope.lua | 6 +- 2 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 stowdir/.config/nvim/lua/config/highlights.lua diff --git a/stowdir/.config/nvim/lua/config/highlights.lua b/stowdir/.config/nvim/lua/config/highlights.lua new file mode 100644 index 0000000..76ab5ae --- /dev/null +++ b/stowdir/.config/nvim/lua/config/highlights.lua @@ -0,0 +1,76 @@ +vim.opt.termguicolors = false + +-- Doxygen comment recognition in C/C++. Disable doxygen's own colors so the links below take effect. +vim.g.load_doxygen_syntax = 1 +vim.g.doxygen_enhanced_color = 0 + +local function apply_highlights() + -- Comment / String style. + vim.api.nvim_set_hl(0, "Comment", { italic = true, ctermfg = 243 }) + vim.api.nvim_set_hl(0, "String", { italic = true }) + + -- Match-paren and selection. + vim.api.nvim_set_hl(0, "MatchParen", { ctermfg = 0, ctermbg = 6 }) + vim.api.nvim_set_hl(0, "CursorLine", { ctermbg = 237 }) + vim.api.nvim_set_hl(0, "Visual", { ctermbg = 237 }) + + -- Spell suggestions. + vim.api.nvim_set_hl(0, "SpellBad", { ctermfg = 0, ctermbg = 1 }) + vim.api.nvim_set_hl(0, "SpellRare", { ctermfg = 8, ctermbg = 3 }) + vim.api.nvim_set_hl(0, "SpellCap", { ctermfg = 8, ctermbg = 2 }) + vim.api.nvim_set_hl(0, "SpellLocal", { ctermfg = 8 }) + + -- Copilot ghost text. + vim.api.nvim_set_hl(0, "CopilotSuggestion", { italic = true, ctermfg = 3 }) + + -- Custom doxygen comment style; link doxygen captures to it. + vim.api.nvim_set_hl(0, "CustomDoxyComment", { italic = true, ctermfg = 243 }) + vim.api.nvim_set_hl(0, "doxygenComment", { link = "CustomDoxyComment" }) + vim.api.nvim_set_hl(0, "doxygenBrief", { link = "CustomDoxyComment" }) + vim.api.nvim_set_hl(0, "doxygenSpecialOnelineDesc", { link = "CustomDoxyComment" }) + vim.api.nvim_set_hl(0, "doxygenCommentL", { link = "SpecialComment" }) + vim.api.nvim_set_hl(0, "doxygenSpecialTypeOnelineDesc", { link = "SpecialComment" }) + vim.api.nvim_set_hl(0, "doxygenSpecialHeading", { link = "SpecialComment" }) + + -- Unified TODO/FIXME/etc. highlight. + vim.api.nvim_set_hl(0, "MyTodo", { link = "SpellRare" }) + vim.api.nvim_set_hl(0, "Todo", { link = "MyTodo" }) + -- Treesitter captures for languages with @comment.* support. + vim.api.nvim_set_hl(0, "@comment.todo", { link = "MyTodo" }) + vim.api.nvim_set_hl(0, "@comment.note", { link = "MyTodo" }) + vim.api.nvim_set_hl(0, "@comment.warning", { link = "MyTodo" }) + vim.api.nvim_set_hl(0, "@comment.error", { link = "MyTodo" }) + + -- Strip backgrounds so terminal opacity passes through. + local transparent = { + "Normal", + "NormalNC", + "NormalFloat", + "EndOfBuffer", + "SignColumn", + "LineNr", + "CursorLineNr", + "FloatBorder", + "VertSplit", + "WinSeparator", + "StatusLine", + "StatusLineNC", + "TabLine", + "TabLineFill", + "TabLineSel", + "Pmenu", + "PmenuSbar", + "PmenuThumb", + } + for _, group in ipairs(transparent) do + vim.api.nvim_set_hl(0, group, { bg = "none", ctermbg = "none" }) + end +end + +-- Reapply on ColorScheme so theme switches don't clobber our overrides. +vim.api.nvim_create_autocmd("ColorScheme", { + group = vim.api.nvim_create_augroup("custom_highlights", { clear = true }), + callback = apply_highlights, +}) + +vim.cmd.colorscheme("habamax") diff --git a/stowdir/.config/nvim/lua/plugins/telescope.lua b/stowdir/.config/nvim/lua/plugins/telescope.lua index ac4b2ae..3512f89 100644 --- a/stowdir/.config/nvim/lua/plugins/telescope.lua +++ b/stowdir/.config/nvim/lua/plugins/telescope.lua @@ -49,7 +49,11 @@ return { { "", "Telescope marks", desc = "Telescope marks" }, }, config = function() - require("telescope").setup({}) + require("telescope").setup({ + pickers = { + colorscheme = { enable_preview = true }, + }, + }) require("telescope").load_extension("fzf") vim.api.nvim_create_user_command("Rg", function(opts) From c2eb6dbca65efa9fe08db755a16aced37abbccd2 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sat, 2 May 2026 22:00:59 -0500 Subject: [PATCH 31/50] nvim: Presumably finish the port of vim -> nvim I've covered everything I can think of. We'll see what I missed when I start using nvim more heavily :) --- stowdir/.config/nvim/nvim-features.md | 508 -------------------------- 1 file changed, 508 deletions(-) delete mode 100644 stowdir/.config/nvim/nvim-features.md diff --git a/stowdir/.config/nvim/nvim-features.md b/stowdir/.config/nvim/nvim-features.md deleted file mode 100644 index fd6c354..0000000 --- a/stowdir/.config/nvim/nvim-features.md +++ /dev/null @@ -1,508 +0,0 @@ -# Neovim migration: feature checklist - -Goal: replicate the vim experience in neovim, using modern nvim best-practices -(lazy.nvim, builtin LSP, treesitter, etc.) rather than porting plugin-for-plugin. - -Decisions already made: - -- Independent configs from vim. No shared bundle/. -- Plugin manager: lazy.nvim. -- LSP: builtin nvim LSP via nvim-lspconfig + mason.nvim. Drop ALE. -- Snippets: LuaSnip. Hand-port custom snippets from UltiSnips. -- Telescope alongside FZF. Both available; pick per use case. -- Theme deferred. Use base16 + terminal palette when ready. -- LSPs/formatters/linters installed via mason, not setup.d. - ---- - -## Vanilla settings - -Most `set` options port directly to `vim.opt.` in lua. Same names, -same values. Block-port from `vimrc` to `lua/config/options.lua`. - -- [ ] `enc=utf-8` -- [ ] `nocompatible` (no-op in nvim, default) -- [ ] `keywordprg=:Man` -- [ ] `grepprg=rg --vimgrep --smart-case --follow` -- [ ] `autowrite`, `autoread`, `updatetime=1000` -- [ ] `hidden` -- [ ] Tabs / indent: `tabstop=4`, `softtabstop=0`, `expandtab`, `shiftwidth=4`, - `shiftround`, `smarttab`, `smartindent`, `autoindent`, - `backspace=indent,eol,start`, `nojoinspaces` -- [ ] `title`, `titlestring=...`, `titleold=`, `notitle` on VimLeave -- [ ] `number`, `scrolloff=6`, `sidescrolloff=6`, `virtualedit=all` -- [ ] `wildmenu`, `lazyredraw`, `showmatch`, `showcmd` -- [ ] Search: `incsearch`, `ignorecase`, `smartcase`, `hlsearch`, - `shortmess-=S` -- [ ] `mouse=a` -- [ ] `path+=**` -- [ ] `wildignore+=...` (.git, node_modules, target, build, etc.) -- [ ] Folding: `foldenable`, `foldlevelstart=15`, `foldnestmax=10`, - `foldmethod=indent` (treesitter folding may replace this; see Folding) -- [ ] `cursorline`, `colorcolumn=100`, `textwidth=100` -- [ ] `display=truncate` -- [ ] `equalalways` -- [ ] Undo: `undodir=~/.local/share/nvim/undo`, `undofile` -- [ ] Spell: `spelllang=en_us`, `spellfile=~/.config/nvim/spell/en.utf-8.add`, - `spelloptions=camel` -- [ ] viminfo/shada equivalent: `set shada=!,'500,/5000,:5000,<500,s1000,h` - (note: `shada` replaces `viminfo` in nvim) -- [ ] `pastetoggle=` (note: deprecated in nvim 0.9+; bracketed paste - handles this automatically. Probably drop.) -- [ ] `noshowmode` (lualine/airline shows mode) - ---- - -## Augroups / filetype detection - -- [ ] gitcommit `colorcolumn=72` -- [ ] disable shada for gitcommit and gitrebase (current: viminfo=) -- [ ] nginx detection (*.nginx, /etc/nginx/*, /usr/local/nginx/conf/*, - nginx.conf, nginx/*.conf) -- [ ] dotenv detection (*.env, *.env.*) -- [ ] yaml override `ts=4 sts=4 sw=4 expandtab` -- [ ] commentary settings (`commentstring` for c/cpp/nginx/qmake) -- [ ] Override rust gdb to `rust-gdb` -- [ ] Exit vim if quickfix is the last open window -- [ ] Exit vim if netrw is the last open window -- [ ] Spellfile sort/compile augroups (see Spelling) -- [ ] `paste_toggled` foldexpr workaround (probably drop with - `pastetoggle=` removal) - ---- - -## Theming / highlights - -Theme itself deferred to polish stage (use base16 + terminal palette). -These are the structural highlights independent of theme choice: - -- [ ] `Comment` italic + dim (currently `cterm=italic ctermfg=243`) -- [ ] `String` italic -- [ ] `CursorLine ctermbg=237`, `Visual ctermbg=237` -- [ ] `MatchParen ctermfg=0 ctermbg=6` -- [ ] `Spell{Bad,Rare,Cap,Local}` colors -- [ ] `CopilotSuggestion` italic + ctermfg=3 -- [ ] `MyTodo` augroup that highlights TODO/FIXME/BUG/NOTE/XXX/IMPORTANT - in comments. Treesitter has `@comment.todo`, `@comment.note`, - `@comment.warning` capture groups; can map highlights there instead - of using a vim regex match. -- [ ] `ss` mapping that echoes syntax group under cursor - (treesitter equivalent: `:Inspect` is builtin in nvim 0.9+) - -Doxygen: `g:load_doxygen_syntax`, `doxygen_enhanced_color`, the doxygen -highlight links. Treesitter does not have a dedicated doxygen parser; -nvim still loads vim's doxygen.vim syntax. Probably keep these settings -verbatim. - ---- - -## Statusline / tabline - -Current: vim-airline + airline-themes, with tabline showing splits but -not buffers, ascii symbols, custom colnr/linenr labels. - -- [ ] Statusline (mode, file, position, diagnostics). - Hypothesis: lualine.nvim. Or keep vim-airline (works in nvim). -- [ ] Tabline showing splits only, not buffers. (Per user preference, - "no modern editor tab.") - Hypothesis: lualine has a tabline option. Or just `set showtabline=0` - and skip the feature. -- [ ] ascii symbols (no powerline glyphs) - ---- - -## File / buffer navigation - -Current: FZF + fzf.vim with `` prefix family. - -- [ ] `` Buffers -- [ ] `` Files -- [ ] `` GFiles --cached --others --exclude-standard -- [ ] `` History: -- [ ] `` History/ -- [ ] `` History (file) -- [ ] `` Jumps -- [ ] `` Marks -- [ ] `` Snippets -- [ ] `` insert-mode path completion (fzf-complete-path) - -Hypothesis: keep FZF + fzf.vim verbatim. Add telescope alongside for -features it does notably better (live_grep with preview, lsp_references, -diagnostics). - ---- - -## Search / grep - -- [ ] `:grep` uses ripgrep (`grepprg`) -- [ ] Live grep with preview. - Hypothesis: telescope live_grep. -- [ ] Search history navigation - (already covered by ``/``) - ---- - -## LSP-like features (ALE replacement) - -Current: ALE provides linting, fixing, completion, hover, definition, -rename, references, all unified. - -Hypothesis: nvim builtin LSP (nvim-lspconfig) + mason for installs. -Diagnostics UI (`vim.diagnostic.config`) tuned to match ALE's look. - -Servers needed (by current language): - -- [ ] clangd (C, C++) with custom flags: - `--background-index --header-insertion=iwyu --pch-storage=memory - --completion-style=bundled --compute-dead --query-driver=... - -j=4 --clang-tidy` -- [ ] rust-analyzer with custom config: - `cargo.cfgs=['test'], features='all', procMacro.enable=true, - check.command='clippy', diagnostics.disabled=['unresolved-proc-macro']` -- [ ] ruff (Python lint + format) -- [ ] basedpyright or pyright (Python types) -- [ ] typescript-language-server -- [ ] eslint-language-server -- [ ] cmake-language-server (cmake_lint replacement) -- [ ] texlab (LaTeX) -- [ ] bash-language-server -- [ ] marksman (Markdown) - -Keybinds (currently ALE): - -- [ ] `` run all fixers (current: ALEFix) - Hypothesis: conform.nvim `format()` -- [ ] `` rename symbol - Hypothesis: `vim.lsp.buf.rename` -- [ ] `` find references in quickfix - Hypothesis: `vim.lsp.buf.references` or telescope `lsp_references` -- [ ] `` toggle header/source (CurtineIncSw, kept verbatim) -- [ ] `gd` go to definition - Hypothesis: `vim.lsp.buf.definition` -- [ ] `gD` go to type definition - Hypothesis: `vim.lsp.buf.type_definition` -- [ ] `K` hover (already builtin in nvim 0.10+) -- [ ] `]p` / `[p` next/previous problem - Hypothesis: `vim.diagnostic.jump({count=1})` etc. Note: `]d`/`[d` - are now builtin defaults; can rebind to `]p`/`[p` for muscle memory. -- [ ] `]q` / `[q` quickfix navigation (cnext/cprev, already in vim) - -Diagnostic UI (currently ALE): - -- [ ] virtual text shown only on current line (`virtualtext_cursor='current'`) -- [ ] virtual text starts at column 80, max column 120 -- [ ] floating preview for hover/details (no border) -- [ ] sign column always shown -- [ ] format `[severity][linter][code] message` - -Hypothesis: `vim.diagnostic.config({virtual_text=..., float=..., -underline=..., signs=...})` plus a `CursorMoved` autocmd for -current-line-only virtual text behavior. - ---- - -## Formatting - -Current ALE fixers, by filetype: - -- [ ] `*` remove_trailing_lines + trim_whitespace -- [ ] c clang-format -- [ ] cmake cmakeformat -- [ ] cpp clangtidy + clang-format -- [ ] css prettier -- [ ] html prettier (with `--print-width 120 --prose-wrap always - --tab-width 4 --html-whitespace-sensitivity css`) -- [ ] javascript prettier -- [ ] json jq (`--indent 4`) -- [ ] markdown dprint -- [ ] python ruff_format (`--line-length=100`) -- [ ] rust rustfmt - (`--config group_imports=StdExternalCrate,imports_granularity=Module - --style-edition=2024`) -- [ ] sh shfmt (`--indent 4`) -- [ ] tex latexindent (`--yaml="defaultIndent:' '"`) -- [ ] toml dprint -- [ ] vimwiki dprint - -Hypothesis: conform.nvim. Each language gets a `formatters_by_ft` entry, -custom args via `formatters` table. - ---- - -## Linting (non-LSP) - -ALE linters not covered by LSP: - -- [ ] cmake_lint (will be covered by cmake-language-server LSP, drop) -- [ ] chktex (LaTeX style) -- [ ] hadolint (Dockerfile, with `g:ale_dockerfile_hadolint_use_docker = 'yes'`) -- [ ] eslint (covered by eslint-language-server LSP) - -Hypothesis: nvim-lint for chktex and hadolint. Let LSPs cover the rest. - ---- - -## Completion - -Current: ALE completion, omnicompletion via ``/``, -`` accepts when popup is open, `` for path via fzf. - -- [ ] `` triggers completion -- [ ] `` accepts the selected completion -- [ ] `` path completion (kept via fzf, see File/buffer) -- [ ] LSP-driven completion sources -- [ ] Buffer completion source -- [ ] Path completion source -- [ ] Snippet completion source -- [ ] `completeopt=menu,menuone,popup` - -Hypothesis: blink.cmp (modern, fast). nvim-cmp is the older alternative. - ---- - -## Snippets - -Current: UltiSnips with `~/.vim/snips/*.snippets`, custom triggers, -Python interpolation, regex triggers. - -- [ ] `` expand snippet / jump forward -- [ ] `` jump backward -- [ ] Snippet picker (currently ``) -- [ ] Port `all.snippets`: copyright, date, datetime, uuid, box - (uuid uses Python; box uses Python) -- [ ] Port `c.snippets`: main -- [ ] Port `cpp.snippets`: class (basename-derived), using, namespace (regex) -- [ ] Port `html.snippets` -- [ ] Port `make.snippets` -- [ ] Port `markdown.snippets` -- [ ] Port `python.snippets` -- [ ] Port `sh.snippets` -- [ ] Port `snippets.snippets` (meta) -- [ ] Port `vimwiki.snippets` - -Hypothesis: LuaSnip for engine. friendly-snippets for community pack. -Custom snippets with Python interpolation rewritten as lua snippets. -Snippet picker via telescope (`:Telescope luasnip`) or via blink.cmp's -list. - ---- - -## Git integration - -- [ ] Hunk signs in sign column - Hypothesis: gitsigns.nvim (replaces vim-gitgutter) -- [ ] `]c` / `[c` next/previous hunk -- [ ] Hunk preview / stage / undo -- [ ] Line blame -- [ ] `:G`, `:Gdiff`, `:Gblame`, etc. - Hypothesis: vim-fugitive, kept verbatim -- [ ] gitcommit `colorcolumn=72` (already listed in Augroups) -- [ ] Mark colors driven by gitgutter (`SignatureMark{er}TextHLDynamic`) - Hypothesis: replicate via gitsigns + vim-signature - ---- - -## Editing helpers - -All vimscript, all work in nvim. Keep verbatim. - -- [ ] commentary (gcc, gc{motion}) -- [ ] vim-surround (cs/ds/ys) -- [ ] vim-repeat -- [ ] vim-unimpaired (`]q`, `[q`, `]b`, `[b`, etc.) -- [ ] vim-eunuch (`:Move`, `:Rename`, `:Chmod`, `:SudoWrite`) -- [ ] vim-indent-object (`ai`, `ii`) -- [ ] vim-textobj-comment + vim-textobj-user (`ac`, `ic`) -- [ ] quick-scope (highlights unique chars on f/F/t/T) -- [ ] vim-tmux-navigator (`` between tmux + vim panes) - ---- - -## Custom keybinds - -- [ ] `` clears search highlight -- [ ] `<` and `>` in visual reselect after indent -- [ ] System clipboard via `clip` script: - - [ ] `` paste in i/v/n - - [ ] `` copy in i/v/n -- [ ] `` toggles fold -- [ ] `j`/`k` move by visual line -- [ ] `i#` doesn't bring comment to col 0 -- [ ] `` open new empty buffer -- [ ] `:bd` doesn't close window (cnoreabbrev workaround) - ---- - -## Folding - -- [ ] enabled, level 15, max nest 10 -- [ ] `foldmethod=indent` (currently chosen for cpp speed) -- [ ] `` toggles fold -- [ ] vimwiki uses syntax folding (`g:vimwiki_folding = 'syntax'`) - -Hypothesis: treesitter folding (`foldexpr=v:lua.vim.treesitter.foldexpr()`) -is faster than indent. Try it on large C++ files. - ---- - -## Spelling - -- [ ] `` toggle spell -- [ ] custom `~/.vim/spell/en.utf-8.add` -> port location -- [ ] SetupSpellfile() function: rebuild .spl from .add when stale -- [ ] SortSpellfile() function: sort+dedupe .add on VimLeave - -Hypothesis: same lua function in `lua/config/spelling.lua`. - ---- - -## Undo - -- [ ] persistent undo (`undofile`) in `~/.local/share/nvim/undo` -- [ ] undo tree visualization - Hypothesis: vim-mundo (kept) or undotree.vim - ---- - -## Mark display - -- [ ] vim-signature (kept). Marks shown in sign column with gitgutter - driving the color. - ---- - -## Manpager - -- [ ] vim used as MANPAGER (`man -P 'vim ...'` use case) - Hypothesis: nvim has builtin man support. `:Man` works out of the box. - Use `MANPAGER='nvim +Man\!'` env var. Drop vim-manpager. -- [ ] after/ftplugin/man.vim customization (port to ftplugin/man.lua - or remove if defaults are fine) - ---- - -## Local vimrc - -- [ ] `g:localvimrc_ask=0` (auto-source per-project .lvimrc) - Hypothesis: vim-localvimrc kept verbatim. nvim's `vim.secure.read` - is narrower in scope. - ---- - -## ANSI escape rendering - -- [ ] AnsiEsc plugin to render ANSI color codes in buffer. - Hypothesis: vim-plugin-AnsiEsc kept verbatim. (No nvim-native peer.) - ---- - -## Debugging - -Current: vimspector with debugpy, vscode-cpptools, CodeLLDB. - -- [ ] `` toggle breakpoint -- [ ] `` continue -- [ ] `` pause -- [ ] `du/dd` up/down frame -- [ ] `db` breakpoints -- [ ] `ds/dn/df` step into/over/out -- [ ] `dc` run to cursor -- [ ] `]d`/`[d` jump to next/prev breakpoint - Note: collides with new `]d`/`[d` LSP diagnostic builtin. -- [ ] `di` inspect (n/v) -- [ ] custom process picker via fzf - -Hypothesis: vimspector kept verbatim. Reassess vs nvim-dap if vimspector -falls short. - ---- - -## Filetypes / language plugins - -Plugins kept (no nvim-native peer or treesitter parser): - -- [ ] vim-bitbake -- [ ] vim-flatbuffers -- [ ] vim-ps1 - -Treesitter parsers (replace highlight plugins): - -- [ ] cpp (replaces vim-cpp-enhanced-highlight; preserve - `cpp_class_scope_highlight`, `cpp_posix_standard` settings via - treesitter equivalents if possible) -- [ ] c, rust, python, javascript, typescript, json, html, css, - markdown, toml, yaml, bash, lua, vimdoc, vim, latex, - cmake, gitcommit, diff - -Drop: - -- [ ] rust.vim (treesitter + rust-analyzer cover everything used) -- [ ] vim-toml (treesitter has toml) -- [ ] vim-systemd-syntax (builtin) -- [ ] vim-cpp-enhanced-highlight (treesitter) - ---- - -## Copilot - -- [ ] copilot.vim (kept verbatim; officially supported on nvim) -- [ ] `g:copilot_filetypes` config (disable on text, dotenv) -- [ ] `` dismiss -- [ ] `` accept next word -- [ ] `CopilotSuggestion` highlight (already in Highlights) - ---- - -## Vimwiki - -- [ ] vimwiki kept verbatim -- [ ] All `g:vimwiki_*` settings: path, ext, syntax, auto_tags, - automatic_nested_syntaxes, nested_syntaxes, auto_toc, - folding=syntax, key_mappings.table_mappings=0, conceallevel=0 -- [ ] mundo preview width (`g:mundo_preview_bottom`) - ---- - -## Testing (vim-test) - -- [ ] vim-test kept verbatim -- [ ] strategy = "dispatch" - ---- - -## Drop entirely - -- [ ] vim-altscreen (nvim handles altscreen natively; remove `SetAltScreen()` - calls in vimrc) -- [ ] vim-autoread (use builtin `set autoread` + CursorHold `:checktime` - autocmd; or keep if 1000ms polling is missed) -- [ ] vim-manpager (nvim builtin replaces it) -- [ ] rust.vim -- [ ] vim-toml -- [ ] vim-systemd-syntax -- [ ] vim-cpp-enhanced-highlight -- [ ] vis (was for visual-block `:S` substitutions; user confirmed drop) - ---- - -## Hugefile alternate vimrc - -- [ ] vimrc.hugefile equivalent for editing huge files - (no plugins, no autoread, etc.) - Hypothesis: separate `init-hugefile.lua` invoked via - `nvim -u ~/.config/nvim/init-hugefile.lua`. - ---- - -## Open questions - -1. Treesitter folding vs indent folding for large C++. Compare in practice. -2. blink.cmp vs nvim-cmp. blink is newer, nvim-cmp is more battle-tested. -3. Whether to keep vim-airline or move to lualine. Lualine is more modern - but airline already works. -4. `]d`/`[d` collision: nvim's new builtin diagnostic jumps vs your - current vimspector breakpoint jumps. Pick one. -5. Whether to keep custom MyTodo augroup or use treesitter - `@comment.todo` capture group. -6. Whether `pastetoggle=` and the FastPaste augroup are still useful - given nvim's bracketed paste handling. From 68532400467bc08301f24714a23eb87a510c2432 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sun, 3 May 2026 11:15:02 -0500 Subject: [PATCH 32/50] setup: Make HTTP errors in curl downloads visible --- setup | 25 +++++++++++++++++++++---- setup.d/031-development-packages.sh | 4 ++-- setup.d/032-sysworxx-can-drivers.sh | 2 +- setup.d/050-apps-ubuntu.sh | 6 +++--- setup.d/060-customizations.sh | 2 +- 5 files changed, 28 insertions(+), 11 deletions(-) diff --git a/setup b/setup index 2adbe58..450d113 100755 --- a/setup +++ b/setup @@ -42,9 +42,20 @@ prompt_default_yes() { github_latest_release_tag() { local repo="$1" + local response + local tag - curl --silent --fail "https://api.github.com/repos/$repo/releases/latest" | - grep --only-matching --perl-regexp '"tag_name": "\K(.*)(?=")' + if ! response=$(curl --silent --show-error --fail "https://api.github.com/repos/$repo/releases/latest" 2>&1); then + error "Failed to fetch latest release for $repo: $response" + return 1 + fi + + if ! tag=$(printf '%s' "$response" | grep --only-matching --perl-regexp '"tag_name": "\K(.*)(?=")'); then + error "Could not parse tag_name from GitHub response for $repo" + return 1 + fi + + printf '%s\n' "$tag" } github_download_release() { @@ -52,11 +63,17 @@ github_download_release() { local version="$2" local artifact="$3" local output="${4:-$artifact}" + local url="https://github.com/$repo/releases/download/$version/$artifact" - curl \ + if ! curl \ + --fail \ + --show-error \ --location \ --output "$output" \ - --remote-name "https://github.com/$repo/releases/download/$version/$artifact" + --remote-name "$url"; then + error "Failed to download release artifact $artifact from $repo ($url)" + return 1 + fi } debug() { diff --git a/setup.d/031-development-packages.sh b/setup.d/031-development-packages.sh index 5903f9b..1e4a7d5 100755 --- a/setup.d/031-development-packages.sh +++ b/setup.d/031-development-packages.sh @@ -3,7 +3,7 @@ if prompt_default_no "Install Python development packages?"; then if prompt_default_no "Install Pip?"; then if ! command -v pip &>/dev/null; then info "Pip not installed. Installing..." - curl https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py + curl --fail --show-error https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py python3 /tmp/get-pip.py --user else info "Pip $(pip --version | grep -o '(.*)') already installed" @@ -214,7 +214,7 @@ if prompt_default_no "Install nvm?"; then popd || exit 1 else debug "nvm not found. Installing nvm..." - curl -o- "https://raw.githubusercontent.com/nvm-sh/nvm/$latest_version/install.sh" | bash + curl --fail --show-error -o- "https://raw.githubusercontent.com/nvm-sh/nvm/$latest_version/install.sh" | bash fi # Source nvm so we can use it in following setup steps diff --git a/setup.d/032-sysworxx-can-drivers.sh b/setup.d/032-sysworxx-can-drivers.sh index 28978c0..3581926 100755 --- a/setup.d/032-sysworxx-can-drivers.sh +++ b/setup.d/032-sysworxx-can-drivers.sh @@ -11,7 +11,7 @@ fi if [[ ! -f /tmp/driver.tar.bz2 ]]; then debug "Downloading driver ..." pushd /tmp/ - curl --location "$SYSWORXX_SOCKETCAN_DRIVER_DOWNLOAD_LINK" --output /tmp/driver.tar.bz2 + curl --fail --show-error --location "$SYSWORXX_SOCKETCAN_DRIVER_DOWNLOAD_LINK" --output /tmp/driver.tar.bz2 tar -xjvf /tmp/driver.tar.bz2 popd fi diff --git a/setup.d/050-apps-ubuntu.sh b/setup.d/050-apps-ubuntu.sh index b0f189e..4b27f81 100755 --- a/setup.d/050-apps-ubuntu.sh +++ b/setup.d/050-apps-ubuntu.sh @@ -11,17 +11,17 @@ if prompt_default_no "Install base GUI packages?"; then fi if prompt_default_no "Install VS Code?"; then - curl --location https://go.microsoft.com/fwlink/?LinkID=760868 --output /tmp/code.deb + curl --fail --show-error --location https://go.microsoft.com/fwlink/?LinkID=760868 --output /tmp/code.deb sudo apt install /tmp/code.deb fi if prompt_default_no "Install Discord?"; then - curl --location "https://discordapp.com/api/download?platform=linux&format=deb" --output /tmp/discord.deb + curl --fail --show-error --location "https://discordapp.com/api/download?platform=linux&format=deb" --output /tmp/discord.deb sudo apt install /tmp/discord.deb fi if prompt_default_no "Install Spotify?"; then - curl -sS https://download.spotify.com/debian/pubkey_0D811D58.gpg | sudo apt-key add - + curl --fail -sS https://download.spotify.com/debian/pubkey_0D811D58.gpg | sudo apt-key add - echo "deb http://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list sudo apt update sudo apt install spotify-client diff --git a/setup.d/060-customizations.sh b/setup.d/060-customizations.sh index f464fba..42090c3 100755 --- a/setup.d/060-customizations.sh +++ b/setup.d/060-customizations.sh @@ -14,7 +14,7 @@ fi if prompt_default_no "Install Pointfree font?"; then # https://docs.fedoraproject.org/en-US/quick-docs/fonts/ mkdir -p ~/.local/share/fonts - curl --location --output /tmp/pointfree.zip "https://dl.dafont.com/dl/?f=pointfree" + curl --fail --show-error --location --output /tmp/pointfree.zip "https://dl.dafont.com/dl/?f=pointfree" unzip -d /tmp/ /tmp/pointfree.zip mkdir -p ~/.local/share/fonts/ mv /tmp/pointfree.ttf ~/.local/share/fonts/ From 5dd8c133cdb24284fa20a85a9109d8f5b8d59c9d Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sun, 3 May 2026 11:16:11 -0500 Subject: [PATCH 33/50] setup: Remove colout installation and update I don't use it, so remove it to relieve maintenance burden. --- setup.d/031-development-packages.sh | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/setup.d/031-development-packages.sh b/setup.d/031-development-packages.sh index 1e4a7d5..7b8346c 100755 --- a/setup.d/031-development-packages.sh +++ b/setup.d/031-development-packages.sh @@ -15,20 +15,6 @@ if prompt_default_no "Install Python development packages?"; then info "${YELLOW}Modifying $(which pylint) to use environment python instead of system python..." sed -i 's|/usr/bin/python3|/usr/bin/env python3|' "$(which pylint)" fi - - if prompt_default_yes "Install/update colout?"; then - mkdir -p "$HOME/src/" - if [[ -d "$HOME/src/colout/" ]]; then - pushd "$HOME/src/colout/" || exit 1 - git pull - else - git clone https://github.com/nojhan/colout.git "$HOME/src/colout/" - pushd "$HOME/src/colout/" || exit 1 - python setup.py install --user - fi - - popd || exit 1 - fi fi # Python download_and_install_shellcheck() { From 9b74995c16deb165180a626b32e6b3ec0f428974 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sun, 3 May 2026 11:18:08 -0500 Subject: [PATCH 34/50] vim-plugins: Update plugins --- stowdir/.vim/bundle/ale | 2 +- stowdir/.vim/bundle/fzf | 2 +- stowdir/.vim/bundle/fzf.vim | 2 +- stowdir/.vim/bundle/ultisnips | 2 +- stowdir/.vim/bundle/vim-airline | 2 +- stowdir/.vim/bundle/vim-fugitive | 2 +- stowdir/.vim/bundle/vim-gitgutter | 2 +- stowdir/.vim/bundle/vim-test | 2 +- stowdir/.vim/bundle/vimwiki | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/stowdir/.vim/bundle/ale b/stowdir/.vim/bundle/ale index 69c945d..c59c0d1 160000 --- a/stowdir/.vim/bundle/ale +++ b/stowdir/.vim/bundle/ale @@ -1 +1 @@ -Subproject commit 69c945d5daecadf8e4c4c499d0a7babda748d603 +Subproject commit c59c0d1a573a7b2fe491f78af4f2033bde454753 diff --git a/stowdir/.vim/bundle/fzf b/stowdir/.vim/bundle/fzf index 260d160..b4a86a9 160000 --- a/stowdir/.vim/bundle/fzf +++ b/stowdir/.vim/bundle/fzf @@ -1 +1 @@ -Subproject commit 260d160973a1df05038c93136a076ca29592e755 +Subproject commit b4a86a9c8a688159131a27b6ec9dbce72ec11573 diff --git a/stowdir/.vim/bundle/fzf.vim b/stowdir/.vim/bundle/fzf.vim index 34a564c..b9624aa 160000 --- a/stowdir/.vim/bundle/fzf.vim +++ b/stowdir/.vim/bundle/fzf.vim @@ -1 +1 @@ -Subproject commit 34a564c81f36047f50e593c1656f4580ff75ccca +Subproject commit b9624aa012ddcbae9e79964bfd30cc1fbe3cf263 diff --git a/stowdir/.vim/bundle/ultisnips b/stowdir/.vim/bundle/ultisnips index b22a86f..0223456 160000 --- a/stowdir/.vim/bundle/ultisnips +++ b/stowdir/.vim/bundle/ultisnips @@ -1 +1 @@ -Subproject commit b22a86f9dcc5257624bff3c72d8b902eac468aad +Subproject commit 0223456b89f7f797c5424ddef07cfc28b5cd86a5 diff --git a/stowdir/.vim/bundle/vim-airline b/stowdir/.vim/bundle/vim-airline index 499ae85..1586662 160000 --- a/stowdir/.vim/bundle/vim-airline +++ b/stowdir/.vim/bundle/vim-airline @@ -1 +1 @@ -Subproject commit 499ae85357db811108ba1c52aa161fb09c462572 +Subproject commit 1586662296c9dc946083e17cb6a4ef0b3e7c0d68 diff --git a/stowdir/.vim/bundle/vim-fugitive b/stowdir/.vim/bundle/vim-fugitive index 61b51c0..3b753cf 160000 --- a/stowdir/.vim/bundle/vim-fugitive +++ b/stowdir/.vim/bundle/vim-fugitive @@ -1 +1 @@ -Subproject commit 61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4 +Subproject commit 3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0 diff --git a/stowdir/.vim/bundle/vim-gitgutter b/stowdir/.vim/bundle/vim-gitgutter index 0acb772..21c977e 160000 --- a/stowdir/.vim/bundle/vim-gitgutter +++ b/stowdir/.vim/bundle/vim-gitgutter @@ -1 +1 @@ -Subproject commit 0acb772e76064cc406664ab595b58b3fac76488a +Subproject commit 21c977e8597c468c7dc76001389b0b430d46a4b0 diff --git a/stowdir/.vim/bundle/vim-test b/stowdir/.vim/bundle/vim-test index 931c6cf..bc0e940 160000 --- a/stowdir/.vim/bundle/vim-test +++ b/stowdir/.vim/bundle/vim-test @@ -1 +1 @@ -Subproject commit 931c6cfdd3069df52c4486b25200e4b10d0595c8 +Subproject commit bc0e94059de40641d163516a83c63bc45c716acf diff --git a/stowdir/.vim/bundle/vimwiki b/stowdir/.vim/bundle/vimwiki index 7279261..a54a300 160000 --- a/stowdir/.vim/bundle/vimwiki +++ b/stowdir/.vim/bundle/vimwiki @@ -1 +1 @@ -Subproject commit 72792615e739d0eb54a9c8f7e0a46a6e2407c9e8 +Subproject commit a54a3002e229c4b43d69ced170ff77663a5b2c40 From cebf1890f64869de998e012b9a98602a9773ff2d Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sun, 3 May 2026 11:18:24 -0500 Subject: [PATCH 35/50] GEP: Update Submodule --- GEP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GEP b/GEP index 23fd471..9197ddf 160000 --- a/GEP +++ b/GEP @@ -1 +1 @@ -Subproject commit 23fd4719d88b0bceb5c3d31773ce110b5e1990c2 +Subproject commit 9197ddf747bfdebfa6af4af65a151b5b9e936bdb From df2e04b0d64ab50246ad932bb477f90022418708 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sun, 3 May 2026 11:47:48 -0500 Subject: [PATCH 36/50] tmux: Replace tmux-window-name plugin with custom script I don't want the title of the running program in the window title, just the name of the directory. And if it's in a Git repository, I want the name of the repository, not the CWD basename. --- stowdir/.local/bin/tmux-window-name | 15 +++++++++++++++ stowdir/.tmux.conf | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100755 stowdir/.local/bin/tmux-window-name diff --git a/stowdir/.local/bin/tmux-window-name b/stowdir/.local/bin/tmux-window-name new file mode 100755 index 0000000..8bfe46c --- /dev/null +++ b/stowdir/.local/bin/tmux-window-name @@ -0,0 +1,15 @@ +#!/bin/bash +set -o errexit +set -o pipefail +set -o nounset +set -o noclobber + +path="${1:-$PWD}" + +if [[ "$path" = "$HOME" ]]; then + echo "~" +elif root=$(git -C "$path" rev-parse --show-toplevel 2>/dev/null); then + basename "$root" +else + basename "$path" +fi diff --git a/stowdir/.tmux.conf b/stowdir/.tmux.conf index 99f0e6c..bad6c5d 100644 --- a/stowdir/.tmux.conf +++ b/stowdir/.tmux.conf @@ -5,7 +5,6 @@ set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'sainnhe/tmux-fzf' TMUX_FZF_LAUNCH_KEY="C-f" -set -g @plugin 'ofirgall/tmux-window-name' ################################################################################################### # Pane creation @@ -92,7 +91,8 @@ set -g mouse on set -g focus-events on set -g history-limit 1000000 -set -g @tmux_window_name_max_name_len "25" + +set -g automatic-rename-format '#{=25:#(tmux-window-name "#{pane_current_path}")}' ################################################################################################### # Initialize tmux plugin manager From f8aaceb3f24dfc6a8ec5332644c4e40cc9262ef5 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sun, 3 May 2026 14:24:44 -0500 Subject: [PATCH 37/50] nvim: Detect file changes even when editor is not focused --- stowdir/.config/nvim/lua/config/filewatching.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/stowdir/.config/nvim/lua/config/filewatching.lua b/stowdir/.config/nvim/lua/config/filewatching.lua index ed240aa..17a3055 100644 --- a/stowdir/.config/nvim/lua/config/filewatching.lua +++ b/stowdir/.config/nvim/lua/config/filewatching.lua @@ -1,7 +1,14 @@ vim.opt.autowrite = true vim.opt.updatetime = 1000 -vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, { +vim.api.nvim_create_autocmd({ "BufEnter", "CursorHold", "CursorHoldI", "FocusGained" }, { group = vim.api.nvim_create_augroup("filewatching_checktime", { clear = true }), command = "checktime", }) + +local checktime_timer = vim.uv.new_timer() +checktime_timer:start(2000, 2000, vim.schedule_wrap(function() + if vim.fn.getcmdwintype() == "" then + vim.cmd("checktime") + end +end)) From b4c18fdc6d0b2bb5012d948df27eaaac04700a94 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Sun, 3 May 2026 21:29:01 -0500 Subject: [PATCH 38/50] nvim: Fallback to indent-based folding if there's no treesitter parser --- stowdir/.config/nvim/lua/config/folding.lua | 11 +++++++++++ stowdir/.config/nvim/lua/plugins/treesitter.lua | 1 + 2 files changed, 12 insertions(+) diff --git a/stowdir/.config/nvim/lua/config/folding.lua b/stowdir/.config/nvim/lua/config/folding.lua index 6733f1b..ae6102f 100644 --- a/stowdir/.config/nvim/lua/config/folding.lua +++ b/stowdir/.config/nvim/lua/config/folding.lua @@ -3,4 +3,15 @@ vim.opt.foldnestmax = 10 vim.opt.foldmethod = "expr" vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()" +vim.api.nvim_create_autocmd("FileType", { + group = vim.api.nvim_create_augroup("folding_fallback", { clear = true }), + callback = function(args) + local ok, parser = pcall(vim.treesitter.get_parser, args.buf) + if not ok or not parser then + vim.opt_local.foldmethod = "indent" + vim.opt_local.foldexpr = "" + end + end, +}) + vim.keymap.set("n", "", "za") diff --git a/stowdir/.config/nvim/lua/plugins/treesitter.lua b/stowdir/.config/nvim/lua/plugins/treesitter.lua index 83318c1..44148e7 100644 --- a/stowdir/.config/nvim/lua/plugins/treesitter.lua +++ b/stowdir/.config/nvim/lua/plugins/treesitter.lua @@ -19,6 +19,7 @@ return { "gitcommit", "gitignore", "html", + "htmldjango", "javascript", "json", "lua", From f94df59617b8003df8deea0e12d1758c0bdeb9c7 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Mon, 4 May 2026 10:58:24 -0500 Subject: [PATCH 39/50] nvim: Ensure Mason is setup even if no file is opened --- stowdir/.config/nvim/lua/plugins/lsp.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stowdir/.config/nvim/lua/plugins/lsp.lua b/stowdir/.config/nvim/lua/plugins/lsp.lua index 5cb4451..f8495a1 100644 --- a/stowdir/.config/nvim/lua/plugins/lsp.lua +++ b/stowdir/.config/nvim/lua/plugins/lsp.lua @@ -1,4 +1,8 @@ return { + { + "williamboman/mason.nvim", + opts = {}, + }, { "neovim/nvim-lspconfig", dependencies = { @@ -7,7 +11,6 @@ return { }, event = { "BufReadPost", "BufNewFile" }, config = function() - require("mason").setup() require("mason-lspconfig").setup({ ensure_installed = { "basedpyright", From 9f9bf9d645142cbb912434bf91c04792fde2d5cc Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Mon, 4 May 2026 15:09:04 -0500 Subject: [PATCH 40/50] nvim: Fix treesitter for nvim 0.12+ I'll need to either update to Fedora 44 at home, or use some other method other than dnf to install nvim at home. The main branch of nvim-treesitter only supports nvim 0.12+. --- stowdir/.config/nvim/lazy-lock.json | 4 +- stowdir/.config/nvim/lua/plugins/lsp.lua | 2 +- .../.config/nvim/lua/plugins/treesitter.lua | 195 +++++++++++------- 3 files changed, 119 insertions(+), 82 deletions(-) diff --git a/stowdir/.config/nvim/lazy-lock.json b/stowdir/.config/nvim/lazy-lock.json index d0aa881..972316d 100644 --- a/stowdir/.config/nvim/lazy-lock.json +++ b/stowdir/.config/nvim/lazy-lock.json @@ -15,12 +15,12 @@ "nvim-lint": { "branch": "master", "commit": "eab58b48eb11d7745c11c505e0f3057165902461" }, "nvim-lspconfig": { "branch": "master", "commit": "31026a13eefb20681124706a79fc1df6bf11ab27" }, "nvim-surround": { "branch": "main", "commit": "2e93e154de9ff326def6480a4358bfc149d5da2c" }, - "nvim-treesitter": { "branch": "master", "commit": "cf12346a3414fa1b06af75c79faebe7f76df080a" }, + "nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" }, "nvim-treesitter-textobjects": { "branch": "main", "commit": "851e865342e5a4cb1ae23d31caf6e991e1c99f1e" }, "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, "telescope-undo.nvim": { "branch": "main", "commit": "928d0c2dc9606e01e2cc547196f48d2eaecf58e5" }, - "telescope.nvim": { "branch": "master", "commit": "ec009610d5d259ec59a6edf0219ef3f7ee4732e5" }, + "telescope.nvim": { "branch": "master", "commit": "f04ab730b8f9c6bf3f54a206d0dcddfd70c52d59" }, "vim-bitbake": { "branch": "master", "commit": "e75f8ea12b4a0bcfe46c564a3a78ff7361b0a1c6" }, "vim-eunuch": { "branch": "master", "commit": "e86bb794a1c10a2edac130feb0ea590a00d03f1e" }, "vim-flatbuffers": { "branch": "master", "commit": "ecd75c33576d982f3c83545dff7b3c9245285e75" }, diff --git a/stowdir/.config/nvim/lua/plugins/lsp.lua b/stowdir/.config/nvim/lua/plugins/lsp.lua index f8495a1..a791b89 100644 --- a/stowdir/.config/nvim/lua/plugins/lsp.lua +++ b/stowdir/.config/nvim/lua/plugins/lsp.lua @@ -9,7 +9,7 @@ return { "williamboman/mason.nvim", "williamboman/mason-lspconfig.nvim", }, - event = { "BufReadPost", "BufNewFile" }, + event = "VeryLazy", config = function() require("mason-lspconfig").setup({ ensure_installed = { diff --git a/stowdir/.config/nvim/lua/plugins/treesitter.lua b/stowdir/.config/nvim/lua/plugins/treesitter.lua index 44148e7..c290474 100644 --- a/stowdir/.config/nvim/lua/plugins/treesitter.lua +++ b/stowdir/.config/nvim/lua/plugins/treesitter.lua @@ -1,88 +1,125 @@ +local parsers = { + "bash", + "bitbake", + "c", + "cmake", + "cpp", + "css", + "diff", + "dockerfile", + "gitcommit", + "gitignore", + "html", + "htmldjango", + "javascript", + "json", + "lua", + "markdown", + "markdown_inline", + "proto", + "python", + "rust", + "toml", + "tsx", + "typescript", + "vim", + "vimdoc", + "xml", + "yaml", +} + +local filetypes = { + "bash", + "bitbake", + "c", + "cmake", + "cpp", + "css", + "diff", + "dockerfile", + "gitcommit", + "gitignore", + "help", + "html", + "htmldjango", + "javascript", + "json", + "lua", + "markdown", + "proto", + "python", + "rust", + "sh", + "toml", + "typescript", + "typescriptreact", + "vim", + "xml", + "yaml", +} + return { { "nvim-treesitter/nvim-treesitter", - branch = "master", + branch = "main", + lazy = false, build = ":TSUpdate", - event = { "BufReadPost", "BufNewFile" }, - dependencies = { "nvim-treesitter/nvim-treesitter-textobjects" }, config = function() - require("nvim-treesitter.configs").setup({ - ensure_installed = { - "bash", - "bitbake", - "c", - "cmake", - "cpp", - "css", - "diff", - "dockerfile", - "gitcommit", - "gitignore", - "html", - "htmldjango", - "javascript", - "json", - "lua", - "markdown", - "markdown_inline", - "proto", - "python", - "rust", - "toml", - "tsx", - "typescript", - "vim", - "vimdoc", - "xml", - "yaml", - }, - highlight = { enable = true }, - indent = { enable = true }, - textobjects = { - select = { - enable = true, - lookahead = true, - keymaps = { - ["ac"] = "@comment.outer", - ["ic"] = "@comment.outer", - ["af"] = "@function.outer", - ["if"] = "@function.inner", - ["aC"] = "@class.outer", - ["iC"] = "@class.inner", - ["aa"] = "@parameter.outer", - ["ia"] = "@parameter.inner", - ["ao"] = "@conditional.outer", - ["io"] = "@conditional.inner", - ["al"] = "@loop.outer", - ["il"] = "@loop.inner", - }, - }, - move = { - enable = true, - set_jumps = true, - goto_next_start = { - ["]m"] = "@function.outer", - ["]]"] = "@class.outer", - ["]a"] = "@parameter.inner", - ["]l"] = "@loop.outer", - }, - goto_next_end = { - ["]M"] = "@function.outer", - ["]["] = "@class.outer", - }, - goto_previous_start = { - ["[m"] = "@function.outer", - ["[["] = "@class.outer", - ["[a"] = "@parameter.inner", - ["[l"] = "@loop.outer", - }, - goto_previous_end = { - ["[M"] = "@function.outer", - ["[]"] = "@class.outer", - }, - }, - }, + require("nvim-treesitter").install(parsers) + + vim.api.nvim_create_autocmd("FileType", { + pattern = filetypes, + callback = function() + vim.treesitter.start() + vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" + end, + }) + end, + }, + { + "nvim-treesitter/nvim-treesitter-textobjects", + branch = "main", + dependencies = { "nvim-treesitter/nvim-treesitter" }, + init = function() + vim.g.no_plugin_maps = true + end, + config = function() + require("nvim-treesitter-textobjects").setup({ + select = { lookahead = true }, + move = { set_jumps = true }, }) + + local select = require("nvim-treesitter-textobjects.select").select_textobject + local move = require("nvim-treesitter-textobjects.move") + + vim.keymap.set({ "x", "o" }, "ac", function() select("@comment.outer", "textobjects") end) + vim.keymap.set({ "x", "o" }, "ic", function() select("@comment.outer", "textobjects") end) + vim.keymap.set({ "x", "o" }, "af", function() select("@function.outer", "textobjects") end) + vim.keymap.set({ "x", "o" }, "if", function() select("@function.inner", "textobjects") end) + vim.keymap.set({ "x", "o" }, "aC", function() select("@class.outer", "textobjects") end) + vim.keymap.set({ "x", "o" }, "iC", function() select("@class.inner", "textobjects") end) + vim.keymap.set({ "x", "o" }, "aa", function() select("@parameter.outer", "textobjects") end) + vim.keymap.set({ "x", "o" }, "ia", function() select("@parameter.inner", "textobjects") end) + vim.keymap.set({ "x", "o" }, "ao", function() select("@conditional.outer", "textobjects") end) + vim.keymap.set({ "x", "o" }, "io", function() select("@conditional.inner", "textobjects") end) + vim.keymap.set({ "x", "o" }, "al", function() select("@loop.outer", "textobjects") end) + vim.keymap.set({ "x", "o" }, "il", function() select("@loop.inner", "textobjects") end) + + vim.keymap.set({ "n", "x", "o" }, "]m", function() move.goto_next_start("@function.outer", "textobjects") end) + vim.keymap.set({ "n", "x", "o" }, "]]", function() move.goto_next_start("@class.outer", "textobjects") end) + vim.keymap.set({ "n", "x", "o" }, "]a", function() move.goto_next_start("@parameter.inner", "textobjects") end) + vim.keymap.set({ "n", "x", "o" }, "]l", function() move.goto_next_start("@loop.outer", "textobjects") end) + + vim.keymap.set({ "n", "x", "o" }, "]M", function() move.goto_next_end("@function.outer", "textobjects") end) + vim.keymap.set({ "n", "x", "o" }, "][", function() move.goto_next_end("@class.outer", "textobjects") end) + + vim.keymap.set({ "n", "x", "o" }, "[m", function() move.goto_previous_start("@function.outer", "textobjects") end) + vim.keymap.set({ "n", "x", "o" }, "[[", function() move.goto_previous_start("@class.outer", "textobjects") end) + vim.keymap.set({ "n", "x", "o" }, "[a", function() move.goto_previous_start("@parameter.inner", "textobjects") end) + vim.keymap.set({ "n", "x", "o" }, "[l", function() move.goto_previous_start("@loop.outer", "textobjects") end) + + vim.keymap.set({ "n", "x", "o" }, "[M", function() move.goto_previous_end("@function.outer", "textobjects") end) + vim.keymap.set({ "n", "x", "o" }, "[]", function() move.goto_previous_end("@class.outer", "textobjects") end) end, }, } From 62d62073e0d7535ad2c45e397f37c3fad5e2a713 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Mon, 4 May 2026 16:28:32 -0500 Subject: [PATCH 41/50] nvim: Give :Lazy popup window a border --- stowdir/.config/nvim/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/stowdir/.config/nvim/init.lua b/stowdir/.config/nvim/init.lua index 4741877..2e3e855 100644 --- a/stowdir/.config/nvim/init.lua +++ b/stowdir/.config/nvim/init.lua @@ -30,4 +30,5 @@ vim.opt.rtp:prepend(lazypath) require("lazy").setup({ spec = { { import = "plugins" } }, checker = { enabled = true }, + ui = { border = "single" }, }) From 2ab11fbae09ac09caed4a50d8f5aaf26bb897d25 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Tue, 5 May 2026 17:51:22 -0500 Subject: [PATCH 42/50] setup: Install nvim from GitHub releases This allows me to get nvim 0.12+ on both Fedora and Ubuntu without relying on PPAs or building from source. --- setup.d/020-fancy-tools.sh | 37 +++++++++++++++++++++++++++++ setup.d/031-development-packages.sh | 1 + 2 files changed, 38 insertions(+) diff --git a/setup.d/020-fancy-tools.sh b/setup.d/020-fancy-tools.sh index bc89d7a..b50b74f 100755 --- a/setup.d/020-fancy-tools.sh +++ b/setup.d/020-fancy-tools.sh @@ -49,4 +49,41 @@ if prompt_default_yes "Install/update fancy shell tools?"; then download_and_install_delta "$latest_version" fi fi + + download_and_install_nvim() { + local -r artifact="nvim-linux-x86_64.tar.gz" + pushd /tmp || exit 1 + + debug "downloading $artifact ..." + github_download_release "neovim/neovim" "stable" "$artifact" + + debug "installing ..." + tar -C ~/.local/ --strip-components=1 -xzvf "$artifact" + + popd || exit 1 + } + + if prompt_default_yes "Install/update nvim from GitHub?"; then + latest_version=$(github_latest_release_tag "neovim/neovim") + info "Found latest version: $latest_version" + + if command -v nvim &>/dev/null; then + installed_version=$(nvim --version | sed -En 's/^NVIM (v[0-9]+\.[0-9]+\.[0-9]+).*$/\1/p') + debug "Found installed version: $installed_version" + + if [[ "$installed_version" != "$latest_version" ]]; then + info "Updating nvim..." + download_and_install_nvim + else + info "nvim $installed_version already installed." + if prompt_default_no "Reinstall nvim?"; then + info "Reinstalling nvim..." + download_and_install_nvim + fi + fi + else + info "Installing nvim for the first time..." + download_and_install_nvim + fi + fi fi diff --git a/setup.d/031-development-packages.sh b/setup.d/031-development-packages.sh index 7b8346c..a8e426f 100755 --- a/setup.d/031-development-packages.sh +++ b/setup.d/031-development-packages.sh @@ -136,6 +136,7 @@ if prompt_default_no "Install/update Rust?"; then dump_syms \ minidump-stackwalk \ rustfilt \ + tree-sitter-cli \ ; fi fi # Rust From fa18a86c2242b2c66a398cc9c411d37ccb7f9e79 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Tue, 5 May 2026 18:07:54 -0500 Subject: [PATCH 43/50] nvim: Kanagawa colorscheme --- stowdir/.config/nvim/lazy-lock.json | 1 + .../.config/nvim/lua/config/highlights.lua | 70 ++++++++++++------- .../.config/nvim/lua/plugins/colorscheme.lua | 17 +++++ 3 files changed, 63 insertions(+), 25 deletions(-) create mode 100644 stowdir/.config/nvim/lua/plugins/colorscheme.lua diff --git a/stowdir/.config/nvim/lazy-lock.json b/stowdir/.config/nvim/lazy-lock.json index 972316d..1149da6 100644 --- a/stowdir/.config/nvim/lazy-lock.json +++ b/stowdir/.config/nvim/lazy-lock.json @@ -6,6 +6,7 @@ "flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" }, "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, "gitsigns.nvim": { "branch": "main", "commit": "dd3f588bacbeb041be6facf1742e42097f62165d" }, + "kanagawa.nvim": { "branch": "master", "commit": "8ad3b4cdcc804b332c32db8f9743667e1bb82b99" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, "lualine.nvim": { "branch": "master", "commit": "131a558e13f9f28b15cd235557150ccb23f89286" }, "marks.nvim": { "branch": "master", "commit": "f353e8c08c50f39e99a9ed474172df7eddd89b72" }, diff --git a/stowdir/.config/nvim/lua/config/highlights.lua b/stowdir/.config/nvim/lua/config/highlights.lua index 76ab5ae..cd1d7cf 100644 --- a/stowdir/.config/nvim/lua/config/highlights.lua +++ b/stowdir/.config/nvim/lua/config/highlights.lua @@ -1,4 +1,4 @@ -vim.opt.termguicolors = false +vim.opt.termguicolors = true -- Doxygen comment recognition in C/C++. Disable doxygen's own colors so the links below take effect. vim.g.load_doxygen_syntax = 1 @@ -6,25 +6,25 @@ vim.g.doxygen_enhanced_color = 0 local function apply_highlights() -- Comment / String style. - vim.api.nvim_set_hl(0, "Comment", { italic = true, ctermfg = 243 }) + vim.api.nvim_set_hl(0, "Comment", { italic = true, fg = "#767676" }) vim.api.nvim_set_hl(0, "String", { italic = true }) -- Match-paren and selection. - vim.api.nvim_set_hl(0, "MatchParen", { ctermfg = 0, ctermbg = 6 }) - vim.api.nvim_set_hl(0, "CursorLine", { ctermbg = 237 }) - vim.api.nvim_set_hl(0, "Visual", { ctermbg = 237 }) + vim.api.nvim_set_hl(0, "MatchParen", { fg = "#000000", bg = "#008080" }) + -- vim.api.nvim_set_hl(0, "CursorLine", { bg = "#3a3a3a" }) + -- vim.api.nvim_set_hl(0, "Visual", { bg = "#3a3a3a" }) -- Spell suggestions. - vim.api.nvim_set_hl(0, "SpellBad", { ctermfg = 0, ctermbg = 1 }) - vim.api.nvim_set_hl(0, "SpellRare", { ctermfg = 8, ctermbg = 3 }) - vim.api.nvim_set_hl(0, "SpellCap", { ctermfg = 8, ctermbg = 2 }) - vim.api.nvim_set_hl(0, "SpellLocal", { ctermfg = 8 }) + vim.api.nvim_set_hl(0, "SpellBad", { fg = "#000000", bg = "#800000" }) + vim.api.nvim_set_hl(0, "SpellRare", { fg = "#808080", bg = "#808000" }) + vim.api.nvim_set_hl(0, "SpellCap", { fg = "#808080", bg = "#008000" }) + vim.api.nvim_set_hl(0, "SpellLocal", { fg = "#808080" }) -- Copilot ghost text. - vim.api.nvim_set_hl(0, "CopilotSuggestion", { italic = true, ctermfg = 3 }) + vim.api.nvim_set_hl(0, "CopilotSuggestion", { italic = true, fg = "#808000" }) -- Custom doxygen comment style; link doxygen captures to it. - vim.api.nvim_set_hl(0, "CustomDoxyComment", { italic = true, ctermfg = 243 }) + vim.api.nvim_set_hl(0, "CustomDoxyComment", { italic = true, fg = "#767676" }) vim.api.nvim_set_hl(0, "doxygenComment", { link = "CustomDoxyComment" }) vim.api.nvim_set_hl(0, "doxygenBrief", { link = "CustomDoxyComment" }) vim.api.nvim_set_hl(0, "doxygenSpecialOnelineDesc", { link = "CustomDoxyComment" }) @@ -32,6 +32,16 @@ local function apply_highlights() vim.api.nvim_set_hl(0, "doxygenSpecialTypeOnelineDesc", { link = "SpecialComment" }) vim.api.nvim_set_hl(0, "doxygenSpecialHeading", { link = "SpecialComment" }) + -- Telescope panels follow the active theme's float colors instead of kanagawa's transparent override. + vim.api.nvim_set_hl(0, "TelescopeNormal", { link = "NormalFloat" }) + vim.api.nvim_set_hl(0, "TelescopeBorder", { link = "FloatBorder" }) + vim.api.nvim_set_hl(0, "TelescopePromptNormal", { link = "NormalFloat" }) + vim.api.nvim_set_hl(0, "TelescopePromptBorder", { link = "FloatBorder" }) + vim.api.nvim_set_hl(0, "TelescopeResultsNormal", { link = "NormalFloat" }) + vim.api.nvim_set_hl(0, "TelescopeResultsBorder", { link = "FloatBorder" }) + vim.api.nvim_set_hl(0, "TelescopePreviewNormal", { link = "NormalFloat" }) + vim.api.nvim_set_hl(0, "TelescopePreviewBorder", { link = "FloatBorder" }) + -- Unified TODO/FIXME/etc. highlight. vim.api.nvim_set_hl(0, "MyTodo", { link = "SpellRare" }) vim.api.nvim_set_hl(0, "Todo", { link = "MyTodo" }) @@ -41,29 +51,41 @@ local function apply_highlights() vim.api.nvim_set_hl(0, "@comment.warning", { link = "MyTodo" }) vim.api.nvim_set_hl(0, "@comment.error", { link = "MyTodo" }) - -- Strip backgrounds so terminal opacity passes through. + -- Strip backgrounds so terminal opacity passes through; preserve fg on each group local transparent = { + "CursorLineNr", + "DiagnosticSignError", + "DiagnosticSignHint", + "DiagnosticSignInfo", + "DiagnosticSignOk", + "DiagnosticSignWarn", + "EndOfBuffer", + "GitSignsAdd", + "GitSignsChange", + "GitSignsChangedelete", + "GitSignsDelete", + "GitSignsTopdelete", + "GitSignsUntracked", + "LineNr", "Normal", "NormalNC", - "NormalFloat", - "EndOfBuffer", + "Pmenu", + "PmenuSbar", + "PmenuThumb", "SignColumn", - "LineNr", - "CursorLineNr", - "FloatBorder", - "VertSplit", - "WinSeparator", "StatusLine", "StatusLineNC", "TabLine", "TabLineFill", "TabLineSel", - "Pmenu", - "PmenuSbar", - "PmenuThumb", + "VertSplit", + "WinSeparator", } for _, group in ipairs(transparent) do - vim.api.nvim_set_hl(0, group, { bg = "none", ctermbg = "none" }) + local hl = vim.api.nvim_get_hl(0, { name = group, link = false }) + hl.bg = "none" + hl.ctermbg = "none" + vim.api.nvim_set_hl(0, group, hl) end end @@ -72,5 +94,3 @@ vim.api.nvim_create_autocmd("ColorScheme", { group = vim.api.nvim_create_augroup("custom_highlights", { clear = true }), callback = apply_highlights, }) - -vim.cmd.colorscheme("habamax") diff --git a/stowdir/.config/nvim/lua/plugins/colorscheme.lua b/stowdir/.config/nvim/lua/plugins/colorscheme.lua new file mode 100644 index 0000000..1c78e94 --- /dev/null +++ b/stowdir/.config/nvim/lua/plugins/colorscheme.lua @@ -0,0 +1,17 @@ +return { + { + "rebelot/kanagawa.nvim", + lazy = false, + priority = 1000, + opts = { + theme = "dragon", + transparent = true, + dimInactive = true, + keywordStyle = { italic = false }, + }, + config = function(_, opts) + require("kanagawa").setup(opts) + vim.cmd.colorscheme("kanagawa-dragon") + end, + }, +} From 7a5cbf146c7946d9454ee0c0810544731c9930f8 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Tue, 5 May 2026 18:57:52 -0500 Subject: [PATCH 44/50] nvim: Add diagnostic popup keybind --- stowdir/.config/nvim/lua/config/diagnostics.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stowdir/.config/nvim/lua/config/diagnostics.lua b/stowdir/.config/nvim/lua/config/diagnostics.lua index 248c127..cba4c84 100644 --- a/stowdir/.config/nvim/lua/config/diagnostics.lua +++ b/stowdir/.config/nvim/lua/config/diagnostics.lua @@ -1,5 +1,7 @@ vim.diagnostic.config({ virtual_text = { current_line = true }, severity_sort = true, - float = { border = "none", source = true }, + float = { border = "rounded", source = true }, }) + +vim.keymap.set("n", "gl", vim.diagnostic.open_float, { desc = "Show line diagnostics" }) From 364ee2dc7e55da25d9a71a04684093c9df22b3f1 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Tue, 5 May 2026 19:05:36 -0500 Subject: [PATCH 45/50] nvim: Fix lua_ls config not being applied LSP was started before config was created and passed. --- stowdir/.config/nvim/lua/plugins/lsp.lua | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/stowdir/.config/nvim/lua/plugins/lsp.lua b/stowdir/.config/nvim/lua/plugins/lsp.lua index a791b89..a93f9df 100644 --- a/stowdir/.config/nvim/lua/plugins/lsp.lua +++ b/stowdir/.config/nvim/lua/plugins/lsp.lua @@ -11,17 +11,6 @@ return { }, event = "VeryLazy", config = function() - require("mason-lspconfig").setup({ - ensure_installed = { - "basedpyright", - "bashls", - "clangd", - "lua_ls", - "neocmake", - "ruff", - }, - }) - vim.lsp.config("clangd", { cmd = { "clangd", @@ -58,6 +47,17 @@ return { }, }, }) + require("mason-lspconfig").setup({ + ensure_installed = { + "basedpyright", + "bashls", + "clangd", + "lua_ls", + "neocmake", + "ruff", + }, + }) + vim.lsp.enable({ "basedpyright", "bashls", From 8de84785b4b9d1ce9080a1093606ed784f453132 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Tue, 5 May 2026 19:10:05 -0500 Subject: [PATCH 46/50] fixup! nvim: Kanagawa colorscheme --- stowdir/.config/nvim/lua/plugins/colorscheme.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stowdir/.config/nvim/lua/plugins/colorscheme.lua b/stowdir/.config/nvim/lua/plugins/colorscheme.lua index 1c78e94..d3578d9 100644 --- a/stowdir/.config/nvim/lua/plugins/colorscheme.lua +++ b/stowdir/.config/nvim/lua/plugins/colorscheme.lua @@ -8,6 +8,11 @@ return { transparent = true, dimInactive = true, keywordStyle = { italic = false }, + overrides = function(colors) + return { + ["@markup.raw.markdown_inline"] = { fg = colors.palette.carpYellow }, + } + end, }, config = function(_, opts) require("kanagawa").setup(opts) From e559b4e3cab82c8735810af2536afac90f3ea1a8 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Wed, 6 May 2026 11:31:50 -0500 Subject: [PATCH 47/50] nvim: Temporarily switch to light colorscheme during presentation --- bashrc.d/070-environment.sh | 2 +- stowdir/.config/nvim/lua/plugins/colorscheme.lua | 6 +++--- stowdir/.gitconfig | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bashrc.d/070-environment.sh b/bashrc.d/070-environment.sh index f7ff0ba..ed44727 100644 --- a/bashrc.d/070-environment.sh +++ b/bashrc.d/070-environment.sh @@ -42,7 +42,7 @@ export LIBRARY_PATH="$HOME/.local/lib${LIBRARY_PATH:+:${LIBRARY_PATH}}" export LD_LIBRARY_PATH="$LIBRARY_PATH" export EDITOR=nvim -export BAT_THEME=base16 +export BAT_THEME=gruvbox-light # Fix less not rendering control characters with git-log on the Opp lab machines. export LESS=FRX diff --git a/stowdir/.config/nvim/lua/plugins/colorscheme.lua b/stowdir/.config/nvim/lua/plugins/colorscheme.lua index d3578d9..5ff9412 100644 --- a/stowdir/.config/nvim/lua/plugins/colorscheme.lua +++ b/stowdir/.config/nvim/lua/plugins/colorscheme.lua @@ -4,19 +4,19 @@ return { lazy = false, priority = 1000, opts = { - theme = "dragon", + theme = "lotus", transparent = true, dimInactive = true, keywordStyle = { italic = false }, overrides = function(colors) return { - ["@markup.raw.markdown_inline"] = { fg = colors.palette.carpYellow }, + -- ["@markup.raw.markdown_inline"] = { fg = colors.palette.carpYellow }, } end, }, config = function(_, opts) require("kanagawa").setup(opts) - vim.cmd.colorscheme("kanagawa-dragon") + vim.cmd.colorscheme("kanagawa-lotus") end, }, } diff --git a/stowdir/.gitconfig b/stowdir/.gitconfig index bf4264d..3f185ce 100644 --- a/stowdir/.gitconfig +++ b/stowdir/.gitconfig @@ -18,7 +18,8 @@ diffFilter = delta --color-only [delta] line-numbers = true - syntax-theme = base16 + syntax-theme = gruvbox-light + light = true # side-by-side diffs are nice, but utilize __delta_side_by_side_width to enable/disable them # based on the current terminal width. #side-by-side = true From c8c4344b6536efe32f71d889b6ed1042cf0e5cc2 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Wed, 6 May 2026 11:43:58 -0500 Subject: [PATCH 48/50] fixup! nvim: LSP, linters, and formatters --- stowdir/.config/nvim/lua/plugins/lsp.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/stowdir/.config/nvim/lua/plugins/lsp.lua b/stowdir/.config/nvim/lua/plugins/lsp.lua index a93f9df..f97c222 100644 --- a/stowdir/.config/nvim/lua/plugins/lsp.lua +++ b/stowdir/.config/nvim/lua/plugins/lsp.lua @@ -18,7 +18,6 @@ return { "--header-insertion=iwyu", "--pch-storage=memory", "--completion-style=bundled", - "--compute-dead", "--query-driver=/opt/**/*-linux-*,/usr/bin/c++,/usr/bin/cc,/usr/bin/gcc,/usr/bin/g++", "-j=4", "--clang-tidy", From df71b3e5811d400a3345436453dc83542bdbeaa9 Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Wed, 6 May 2026 13:13:48 -0500 Subject: [PATCH 49/50] bash: Alias xxd to use color by default --- bashrc.d/030-aliases.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bashrc.d/030-aliases.sh b/bashrc.d/030-aliases.sh index 188a9c9..5d40995 100644 --- a/bashrc.d/030-aliases.sh +++ b/bashrc.d/030-aliases.sh @@ -23,6 +23,7 @@ alias acl='sudo apt-get autoclean' alias arem='sudo apt-get autoremove' alias readelf='readelf --wide' +alias xxd='xxd -R always' # Thin shim for man that provides primitive coloring, and help for builtins man() { From 23c1bff1c966ba0fe34baf45ad3090ff72536dce Mon Sep 17 00:00:00 2001 From: Austin Gill Date: Wed, 6 May 2026 13:14:22 -0500 Subject: [PATCH 50/50] nvim: Add lastplace plugin to return cursor to last position in file This is something that was enabled by default in vim that nvim deviated from. I enjoyed it quite a bit. --- stowdir/.config/nvim/lazy-lock.json | 1 + stowdir/.config/nvim/lua/plugins/editing.lua | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/stowdir/.config/nvim/lazy-lock.json b/stowdir/.config/nvim/lazy-lock.json index 1149da6..c6b2211 100644 --- a/stowdir/.config/nvim/lazy-lock.json +++ b/stowdir/.config/nvim/lazy-lock.json @@ -13,6 +13,7 @@ "mason-lspconfig.nvim": { "branch": "main", "commit": "0c2823e0418f3d9230ff8b201c976e84de1cb401" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" }, "mason.nvim": { "branch": "main", "commit": "cb8445f8ce85d957416c106b780efd51c6298f89" }, + "nvim-lastplace": { "branch": "main", "commit": "91b996e062affebd7fe787f57a2a3e212457e87b" }, "nvim-lint": { "branch": "master", "commit": "eab58b48eb11d7745c11c505e0f3057165902461" }, "nvim-lspconfig": { "branch": "master", "commit": "31026a13eefb20681124706a79fc1df6bf11ab27" }, "nvim-surround": { "branch": "main", "commit": "2e93e154de9ff326def6480a4358bfc149d5da2c" }, diff --git a/stowdir/.config/nvim/lua/plugins/editing.lua b/stowdir/.config/nvim/lua/plugins/editing.lua index c73c853..24bf680 100644 --- a/stowdir/.config/nvim/lua/plugins/editing.lua +++ b/stowdir/.config/nvim/lua/plugins/editing.lua @@ -26,6 +26,10 @@ return { event = "VeryLazy", opts = {}, }, + { + "mrcjkb/nvim-lastplace", + event = "BufReadPre", + }, { "christoomey/vim-tmux-navigator", cmd = {