Skip to content

fix: relax the go toolchain pin, and warn when termguicolors is off - #40

Merged
undont merged 4 commits into
mainfrom
fix/fresh-install
Aug 11, 2026
Merged

fix: relax the go toolchain pin, and warn when termguicolors is off#40
undont merged 4 commits into
mainfrom
fix/fresh-install

Conversation

@undont

@undont undont commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • build: go.mod asked for an exact patch release, on a plugin whose only install step compiles Go and which ships no prebuilt binaries. under the default GOTOOLCHAIN=auto that downloads a whole toolchain inside the build = hook; under a distro-packaged Go or GOTOOLCHAIN=local it fails outright with go.mod requires go >= 1.26.9 (running go 1.26.5; GOTOOLCHAIN=local). relaxed to go 1.26; CI reads go-version-file: go.mod and still resolves the latest 1.26.x
  • fix: a sidecar protocol mismatch told the user to run :Differ build, which is not a command. it now names make go-build, matching its lua twin at sidecar/init.lua:190 and the run \cmd`shape inauth.go:30`. reachable after a plugin update without a rebuild, which is when the two protocol versions diverge
  • fix: every palette group carries gui fg/bg and no cterm pair, so with termguicolors off the diff, merge and thread palette is dropped and nothing said why. the linked groups survive, so the panel keeps its chrome and loses its colour coding, while the diff body loses add-vs-delete entirely. warns once rather than refusing: nvim enables the option itself on any terminal it detects as 24-bit capable, and one that genuinely isn't should still get a usable session. a setup() during startup holds the check until VimEnter, so a colorscheme or a late option file can still turn it on first
  • docs: :Differ sidecar [stop], cache clear, mergetool [path], gofile and edit were undocumented. sidecar is the only built-in diagnostic and the answer to "why won't PR review work"; cache clear is the only escape hatch for the thread cache, which flushes on your own mutations alone. the merge tool documented ~20 lines of keymaps while never saying how to open it, so its section now opens with :Differ mergetool
  • docs: details = "K" was the one default missing from the readme setup() block, and termguicolors joins requirements

Test plan

  • make check: lua unit 370/0, headless-nvim 443/0, luacheck 0, golangci-lint 0, lua_ls clean, demo-build ok, go ok
  • 4 new tests in test/nvim/highlights_spec.lua; the two warning assertions fail against the guard commented out, the other two pin that it stays quiet when the option is on and defines the groups rather than bailing
  • both warning paths driven under headless nvim: immediate when v:vim_did_enter is 1, deferred to VimEnter when setup() runs during startup
  • with notermguicolors nvim emits ESC[m for a guibg-only group; with it on, ESC[48;2;43;59;43m
  • the patch pin fails against a scratch module under GOTOOLCHAIN=local, and go 1.26 builds on the same machine
  • make vimdoc regenerated and doc/differ.txt committed

@undont
undont force-pushed the fix/fresh-install branch from 7ebfbff to b9728a0 Compare August 11, 2026 22:32
@undont undont changed the title fix: reach the features before the papercuts do fix: relax the go toolchain pin, and warn when termguicolors is off Aug 11, 2026
@undont
undont merged commit 28a5d0c into main Aug 11, 2026
12 checks passed
@undont
undont deleted the fix/fresh-install branch August 11, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant