refactor: simplify and de-duplicate the editor configuration (v0.5.0) - #6
Merged
Conversation
added 5 commits
August 24, 2026 17:45
Removed five modules that were never imported (utility/snacks-nvim.nix, ui/ufo.nix, plugins/notes.nix, plugins/floaterm.nix, plugins/fzf.nix -- fzf-lua duplicated telescope), the empty plugins/snacks/ and lua/ dirs, and plugins/filetree.nix (59 lines configuring neo-tree with enable = false; yazi is the file manager). Deduplicated what was configured more than once: - nvim-notify was set up three times -- its nvf module, a duplicate extraPlugins copy of the same package, and again in noice.nix -- each with a different background colour, so whichever DAG entry ran last won. It now has one definition, in nvf setupOpts, with animation at 30 fps instead of 60. - nvim-autopairs ran alongside mini.pairs, so both plugins reacted to the same keystroke. mini.pairs is now the only autopair provider. - python.nix redefined the whole <leader>z spell keymap set buffer-locally, identically to the global one, and injected syn region/syn match rules that re-armed the regex syntax engine on every Python buffer to reproduce what treesitter's @spell captures already provide. - treesitter.nix repeated the vim.languages.enable* flags languages.nix sets. Autosave no longer fires on TextChanged, and conform moved from format_on_save to format_after_save: every pause after any normal-mode edit used to write the buffer and run a synchronous formatter straight through the typing path. The per-write "File saved" echo is gone too -- noice was already filtering those messages out.
- check_formatters called conform.list_formatters() without requiring conform, so <leader>cc threw instead of listing formatters. - Telescope was set up twice; the second call, from luaConfigRC, re-applied telescope's own defaults over the declarative defaults block (file_ignore_patterns, the --hidden vimgrep arguments) and forced the plugin to initialise before nvf's setup ran. It also re-loaded three extensions nvf already loads. The chafa previewer's requires moved inside the function so the block no longer pulls telescope and plenary in at file scope. - The <leader>tv which-key label initialised as OFF while virtual-text diagnostics start ON, so the first press read backwards. - A help message pointed at <leader>ss (save session) instead of <leader>zs.
…oggle Options: scrolloff/sidescrolloff 8, a permanently reserved signcolumn so text no longer shifts sideways when a diagnostic or gitsign appears, splitbelow/splitright, inccommand=split, confirm, and tm=400 for which-key feel. tm, not timeoutlen: nvf declares the alias with a default of 500 and emits it after the long name in the generated init.lua, so setting timeoutlen alone was silently overwritten. Keymaps: ]b/[b (buffers), ]d/[d (diagnostics), <Esc> to clear search highlight, centred n/N, <leader>fr (recent files), <leader>fs (grep the word under the cursor) and <leader>tn to toggle inlay hints, which are on by default and get noisy in Python/TypeScript. keymaps.nix also carries three repairs: K was mapped to `<cmd>vim.lsp.buf.hover<CR>`, which is not a valid Ex command, so hover raised an error; <C-h>/<C-l> were bound both as LSP jump-back/go-to-definition and as smart-splits window navigation (window navigation keeps them, since go-to-definition is <leader>nd/gd and jumping back is the built-in <C-o>); and a duplicate <leader>ff plus a no-op <leader>zt are gone. Keymap docs, keyboard diagrams and the which-key reference are regenerated from the live config. Verified headless against the built editor: 24/24 assertions pass, and nix flake check is green.
Autosave now starts disabled and is turned on from the toggles group, where which-key shows its ON/OFF state like the other toggles. 'autowrite' and 'autowriteall' follow the same toggle rather than staying on behind it -- they write implicitly on buffer switches, :make and :next, which is the same behaviour under a different name. Verified headless against the built editor: with autosave off a dirty buffer survives InsertLeave and BufLeave; after <leader>ta the same events write it to disk, and toggling back restores both options.
Notifications had no policy: every message lived for 5 seconds regardless of severity, identical messages stacked up, and the only filtering was a vim.notify monkey-patch for direnv sitting in options.nix among the editor options. - Severity sets the lifetime: error 10s, warning 6s, info 2s. An error you cannot finish reading is worse than no error, and "Autosave enabled" does not deserve five seconds. An explicit timeout from the caller still wins. - Identical messages repeated within two seconds are collapsed; language servers and formatters fail in bursts. - A documented mutelist replaces the monkey-patch: direnv's per-directory export chatter, "No information available" from an empty hover, and the position_encoding deprecation warning. - <leader>tN mutes notifications for presenting or pairing. Errors still get through, so a silent failure cannot hide behind it. - <leader>Nl brings back the message that just faded, with <leader>Na (all) and <leader>Ne (errors only); <leader>Nd now dismisses noice's messages too. - minimum_width 50 -> 20, so short messages get short boxes. The decision is a pure _G.notify_policy() function with a trivial wrapper around it, so it is directly testable: 27/27 headless assertions pass against the built editor, covering timeouts per level, string/nil level handling, caller overrides, each mutelist entry, dedup, and mute letting errors through. Documented in a new handbook page, docs/user-guide/notifications.md.
|
📄 Handbook PDF for this PR ( Download it from the workflow artifacts (short-lived, 7 days). The site preview publishes to GitHub Pages once this merges to 📦 Software Bill of Materials542 components for timvim-wrapped (runtime closure).
Full CycloneDX + SPDX SBOMs are attached as build artefacts. Download the full CycloneDX + SPDX SBOM (short-lived, 7 days). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5
Three commits: dead code and duplication, bug fixes, then the comfort
additions. Full detail in
CHANGELOG.mdunder[0.5.0].Removed
utility/snacks-nvim.nix,ui/ufo.nix,plugins/notes.nix,plugins/floaterm.nix,plugins/fzf.nix), the emptyplugins/snacks/andlua/dirs, andplugins/filetree.nix(neo-tree,enable = false).nvim-notifywas set up three times with threedifferent background colours;
nvim-autopairsran alongsidemini.pairs;python.nixredefined the whole<leader>zspell keymap set and re-armedthe regex syntax engine per Python buffer for what treesitter's
@spellcaptures already do.
Changed
TextChanged, and conform moved toformat_after_save. Every pause after a normal-mode edit used to write thebuffer and run a synchronous formatter on the typing path.
Fixed
Kwas mapped to an invalid Ex command, so hover errored.<C-h>/<C-l>were bound twice (LSP navigation vs smart-splits).<leader>ccthrew:check_formattersnever required conform.timeoutlenwas silently overridden by nvf'stmalias.Added
scrolloff, a reservedsigncolumn,splitbelow/splitright,inccommand=split,confirm,tm=400.]b/[b,]d/[d,<Esc>to clear search highlight, centredn/N,<leader>fr,<leader>fs,<leader>tn(inlay hints).Verification
nix flake checkgreen (11 checks, including the startup smoke test).applied, telescope defaults intact, autosave events correct, no duplicate
lhswithin a mode.main(5 runs each) — within noise.🤖 Generated with Claude Code