Commit Graph

2 Commits

Author SHA1 Message Date
gffranco bcb32777fb chore(dev): always rebuild release binary in start scripts
ensure_binary used to short-circuit whenever bin/nuwiki-ls existed,
which left vim/nvim running an outdated LSP after every source change.
Now always invoke cargo build (incremental, so a no-op when nothing
changed) and refresh the symlink + log the build timestamp. Add
NUWIKI_DEV_SKIP_BUILD=1 for the rare opt-out.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 15:00:57 +00:00
gffranco cf94f99d3c dev: minimal-config launchers for nvim/vim plugin testing
CI / cargo fmt --check (push) Successful in 28s
CI / cargo clippy (push) Successful in 1m8s
CI / cargo test (push) Successful in 1m27s
Two scripts at the repo root that spin up an isolated editor session
against this checkout, so changes to the plugin or LSP can be smoke-
tested without polluting the user's real (n)vim install:

- start-nvim.sh — builds nuwiki-ls in release mode, symlinks it into
  `bin/`, seeds a scratch wiki under `$XDG_CACHE_HOME/nuwiki-dev/wiki`,
  generates a minimal `init.lua` that prepends this repo to
  `runtimepath`, points `vim.env.XDG_*` at the dev cache so the host's
  Neovim state is untouched, and execs `nvim --clean -u <init>`.

- start-vim.sh — same shape for Vim. Clones vim-lsp + async.vim into
  the dev cache on first run so the LSP path is actually exercisable
  (the plugin's autoload layer prefers vim-lsp). Opt-out via
  `NUWIKI_DEV_NO_LSP=1` for syntax-only testing.

Both scripts:
- Are idempotent (skip cargo build / git clone / wiki seed when their
  outputs are already in place).
- Pass through extra args to the editor; default to opening the
  scratch wiki's index page.
- Accept `NUWIKI_DEV_WIKI=<path>` to point at a custom sandbox.
- Seed `index.wiki` + `Notes.wiki` with smoke-test content covering
  wikilinks, anchors, checkboxes, tags, and the `:Vimwiki*` command
  surface.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 22:04:11 +00:00