From f32f54e8a87dcfdef0d7ce58a3c25acbb8851840 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Fr=C3=B3es=20Franco?= Date: Sat, 30 May 2026 14:35:24 -0300 Subject: [PATCH] Move development scripts into development/, leaving scripts/ plugin-only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The root scripts/ folder now holds only download_bin.vim, the one script the plugin itself invokes (via :NuwikiInstall and the vim-plug/Dein build hooks). All developer tooling — the start-nvim/start-vim launchers, test-personal-wiki, the keymap harnesses, and syntax-diag — moves to development/ alongside the developer docs. REPO_ROOT resolution is unchanged (development/ sits one level under root, same as scripts/ did); only the explicit cross-references, the CI harness invocations, the README launcher paths, and the ONBOARDING structure tree are updated. Co-Authored-By: Claude Opus 4.7 --- .gitea/workflows/ci.yaml | 4 ++-- README.md | 4 ++-- development/ONBOARDING.md | 14 +++++++++++++- {scripts => development}/start-nvim.sh | 10 +++++----- {scripts => development}/start-vim.sh | 14 +++++++------- {scripts => development}/syntax-diag.vim | 4 ++-- {scripts => development}/test-keymaps-vim.sh | 6 +++--- {scripts => development}/test-keymaps-vim.vim | 4 ++-- {scripts => development}/test-keymaps.lua | 2 +- {scripts => development}/test-keymaps.sh | 4 ++-- {scripts => development}/test-personal-wiki.sh | 10 +++++----- 11 files changed, 44 insertions(+), 32 deletions(-) rename {scripts => development}/start-nvim.sh (91%) rename {scripts => development}/start-vim.sh (90%) rename {scripts => development}/syntax-diag.vim (94%) rename {scripts => development}/test-keymaps-vim.sh (90%) rename {scripts => development}/test-keymaps-vim.vim (99%) rename {scripts => development}/test-keymaps.lua (99%) rename {scripts => development}/test-keymaps.sh (94%) rename {scripts => development}/test-personal-wiki.sh (71%) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index e9f9964..6064e0e 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -93,6 +93,6 @@ jobs: sudo apt-get install -y --no-install-recommends vim vim --version | head -1 - name: run Neovim keymap harness - run: ./scripts/test-keymaps.sh + run: ./development/test-keymaps.sh - name: run Vim keymap harness - run: ./scripts/test-keymaps-vim.sh + run: ./development/test-keymaps-vim.sh diff --git a/README.md b/README.md index fff9abe..9b47540 100644 --- a/README.md +++ b/README.md @@ -122,8 +122,8 @@ no extra plugin. ### Try it without touching your config ```sh -./scripts/start-nvim.sh # spawns Neovim against an isolated sample wiki -./scripts/start-vim.sh # same, for plain Vim (clones vim-lsp on first run) +./development/start-nvim.sh # spawns Neovim against an isolated sample wiki +./development/start-vim.sh # same, for plain Vim (clones vim-lsp on first run) ``` Both scripts build the LSP binary, seed a scratch wiki, and launch the diff --git a/development/ONBOARDING.md b/development/ONBOARDING.md index 21baf02..12738eb 100644 --- a/development/ONBOARDING.md +++ b/development/ONBOARDING.md @@ -65,9 +65,21 @@ nuwiki/ ├── doc/ # Vim help documentation │ └── nuwiki.txt │ -├── scripts/ +├── scripts/ # Plugin-runtime scripts only │ └── download_bin.vim # VimL binary download (used by Dein/vim-plug build hooks) │ +├── development/ # Developer-only tooling and docs (not shipped) +│ ├── ONBOARDING.md # This file +│ ├── nuwiki-architecture.html +│ ├── start-nvim.sh # Launch Neovim against a scratch wiki +│ ├── start-vim.sh # Launch Vim against a scratch wiki +│ ├── test-personal-wiki.sh # Launch Vim against your real wiki +│ ├── test-keymaps.sh # Neovim keymap harness (CI) +│ ├── test-keymaps.lua +│ ├── test-keymaps-vim.sh # Vim keymap harness (CI) +│ ├── test-keymaps-vim.vim +│ └── syntax-diag.vim # Dump highlighting state for debugging +│ └── .gitea/ └── workflows/ ├── ci.yaml # Lint, test, fmt check on every push/PR diff --git a/scripts/start-nvim.sh b/development/start-nvim.sh similarity index 91% rename from scripts/start-nvim.sh rename to development/start-nvim.sh index 008ef9a..1edfdf6 100755 --- a/scripts/start-nvim.sh +++ b/development/start-nvim.sh @@ -10,11 +10,11 @@ # $XDG_CACHE_HOME/nuwiki-dev/wiki # * calls `require('nuwiki').setup({...})` # -# Usage: ./scripts/start-nvim.sh [extra args...] -# ./scripts/start-nvim.sh # open the scratch wiki's index -# ./scripts/start-nvim.sh path/to/note.wiki # open a specific file -# NUWIKI_DEV_WIKI=/tmp/foo ./scripts/start-nvim.sh -# NUWIKI_DEV_SKIP_BUILD=1 ./scripts/start-nvim.sh # reuse the cached binary +# Usage: ./development/start-nvim.sh [extra args...] +# ./development/start-nvim.sh # open the scratch wiki's index +# ./development/start-nvim.sh path/to/note.wiki # open a specific file +# NUWIKI_DEV_WIKI=/tmp/foo ./development/start-nvim.sh +# NUWIKI_DEV_SKIP_BUILD=1 ./development/start-nvim.sh # reuse the cached binary # # The release binary is rebuilt on every launch so source changes # always reach the running LSP. `cargo build --release` is incremental, diff --git a/scripts/start-vim.sh b/development/start-vim.sh similarity index 90% rename from scripts/start-vim.sh rename to development/start-vim.sh index babfb1f..768af38 100755 --- a/scripts/start-vim.sh +++ b/development/start-vim.sh @@ -7,13 +7,13 @@ # the dev cache on first run so the LSP integration is exercisable # without polluting your real Vim install. # -# Usage: ./scripts/start-vim.sh [extra args...] -# ./scripts/start-vim.sh # open the scratch wiki's index -# ./scripts/start-vim.sh path/to/note.wiki # open a specific file -# NUWIKI_DEV_WIKI=/tmp/foo ./scripts/start-vim.sh -# NUWIKI_DEV_NO_LSP=1 ./scripts/start-vim.sh # skip vim-lsp setup -# NUWIKI_DEV_NO_SEED=1 ./scripts/start-vim.sh # use WIKI_DIR as-is (no scratch seeding) -# NUWIKI_DEV_SKIP_BUILD=1 ./scripts/start-vim.sh # reuse the cached binary +# Usage: ./development/start-vim.sh [extra args...] +# ./development/start-vim.sh # open the scratch wiki's index +# ./development/start-vim.sh path/to/note.wiki # open a specific file +# NUWIKI_DEV_WIKI=/tmp/foo ./development/start-vim.sh +# NUWIKI_DEV_NO_LSP=1 ./development/start-vim.sh # skip vim-lsp setup +# NUWIKI_DEV_NO_SEED=1 ./development/start-vim.sh # use WIKI_DIR as-is (no scratch seeding) +# NUWIKI_DEV_SKIP_BUILD=1 ./development/start-vim.sh # reuse the cached binary # # The release binary is rebuilt on every launch so source changes # always reach the running LSP. `cargo build --release` is incremental, diff --git a/scripts/syntax-diag.vim b/development/syntax-diag.vim similarity index 94% rename from scripts/syntax-diag.vim rename to development/syntax-diag.vim index bfeeaf0..96ba042 100644 --- a/scripts/syntax-diag.vim +++ b/development/syntax-diag.vim @@ -1,8 +1,8 @@ -" scripts/syntax-diag.vim — dump highlighting state to /tmp/nuwiki-syndiag.log +" development/syntax-diag.vim — dump highlighting state to /tmp/nuwiki-syndiag.log " " Usage: open a .wiki file with VARIED markup (heading, *bold*, _italic_, " `code`), then: -" :source scripts/syntax-diag.vim +" :source development/syntax-diag.vim " Then paste /tmp/nuwiki-syndiag.log back. redir! > /tmp/nuwiki-syndiag.log diff --git a/scripts/test-keymaps-vim.sh b/development/test-keymaps-vim.sh similarity index 90% rename from scripts/test-keymaps-vim.sh rename to development/test-keymaps-vim.sh index 9f92311..6180ee2 100755 --- a/scripts/test-keymaps-vim.sh +++ b/development/test-keymaps-vim.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash # -# scripts/test-keymaps-vim.sh — Vim counterpart of test-keymaps.sh. +# development/test-keymaps-vim.sh — Vim counterpart of test-keymaps.sh. # # Pure-VimL portion only. The LSP-roundtrip keymaps (``, # `=`, `-`, …) talk to the server via vim-lsp's timer-driven async # layer, which doesn't fire reliably inside `vim -e -s`. Those have -# Neovim coverage in scripts/test-keymaps.lua, exercising the same +# Neovim coverage in development/test-keymaps.lua, exercising the same # Lua command layer + server binary. set -euo pipefail @@ -47,7 +47,7 @@ log "running harness…" # `"$TMP/vim.log" 2>&1 || true if [[ ! -f "$RESULTS" ]]; then diff --git a/scripts/test-keymaps-vim.vim b/development/test-keymaps-vim.vim similarity index 99% rename from scripts/test-keymaps-vim.vim rename to development/test-keymaps-vim.vim index cfeb0ab..d14aa4a 100644 --- a/scripts/test-keymaps-vim.vim +++ b/development/test-keymaps-vim.vim @@ -1,4 +1,4 @@ -" scripts/test-keymaps-vim.vim — driven by scripts/test-keymaps-vim.sh. +" development/test-keymaps-vim.vim — driven by development/test-keymaps-vim.sh. " " Pure-VimL keymap regression suite. Plain Vim's LSP path " (vim-lsp + async.vim) talks to the server via timers, which won't @@ -6,7 +6,7 @@ " are restricted to the bindings whose RHS is implemented entirely in " VimL (header/link nav, `o`/`O` bullet continuation, the wrap step " of ``). LSP-roundtrip bindings (``, `=`, `-`, …) get -" their coverage from the Neovim harness in scripts/test-keymaps.lua +" their coverage from the Neovim harness in development/test-keymaps.lua " — same Lua codepath, same server. let s:results = [] diff --git a/scripts/test-keymaps.lua b/development/test-keymaps.lua similarity index 99% rename from scripts/test-keymaps.lua rename to development/test-keymaps.lua index f989438..ef4c18c 100644 --- a/scripts/test-keymaps.lua +++ b/development/test-keymaps.lua @@ -1,4 +1,4 @@ --- scripts/test-keymaps.lua — driven by scripts/test-keymaps.sh. +-- development/test-keymaps.lua — driven by development/test-keymaps.sh. -- -- Headless Neovim harness for the buffer-local keymaps registered by -- `ftplugin/vimwiki.vim` + `lua/nuwiki/keymaps.lua`. Each case sets up diff --git a/scripts/test-keymaps.sh b/development/test-keymaps.sh similarity index 94% rename from scripts/test-keymaps.sh rename to development/test-keymaps.sh index 293df2d..eb7e253 100755 --- a/scripts/test-keymaps.sh +++ b/development/test-keymaps.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# scripts/test-keymaps.sh — drive scripts/test-keymaps.lua under +# development/test-keymaps.sh — drive development/test-keymaps.lua under # headless Neovim and report pass/fail per buffer-local keymap. # # The Lua harness needs a real LSP attachment (most keymaps dispatch @@ -53,7 +53,7 @@ log "running harness…" # stalling CI runners indefinitely. NUWIKI_KEYMAP_RESULTS="$RESULTS" \ timeout 60 nvim --clean -u "$INIT" --headless "$TMP/wiki/index.wiki" \ - -c "luafile $REPO_ROOT/scripts/test-keymaps.lua" \ + -c "luafile $REPO_ROOT/development/test-keymaps.lua" \ >"$TMP/nvim.log" 2>&1 || true if [[ ! -f "$RESULTS" ]]; then diff --git a/scripts/test-personal-wiki.sh b/development/test-personal-wiki.sh similarity index 71% rename from scripts/test-personal-wiki.sh rename to development/test-personal-wiki.sh index 7de6e82..90baa52 100755 --- a/scripts/test-personal-wiki.sh +++ b/development/test-personal-wiki.sh @@ -12,10 +12,10 @@ # under $XDG_CACHE_HOME/nuwiki-dev/ so your real Vim install stays untouched. # # Usage: -# ./scripts/test-personal-wiki.sh # open index.wiki -# ./scripts/test-personal-wiki.sh path/to/note.wiki # open a specific file -# NUWIKI_PERSONAL_WIKI=/other/path ./scripts/test-personal-wiki.sh -# NUWIKI_DEV_SKIP_BUILD=1 ./scripts/test-personal-wiki.sh # reuse the cached binary +# ./development/test-personal-wiki.sh # open index.wiki +# ./development/test-personal-wiki.sh path/to/note.wiki # open a specific file +# NUWIKI_PERSONAL_WIKI=/other/path ./development/test-personal-wiki.sh +# NUWIKI_DEV_SKIP_BUILD=1 ./development/test-personal-wiki.sh # reuse the cached binary set -euo pipefail @@ -31,4 +31,4 @@ fi export NUWIKI_DEV_WIKI="$WIKI_DIR" export NUWIKI_DEV_NO_SEED=1 -exec "$REPO_ROOT/scripts/start-vim.sh" "$@" +exec "$REPO_ROOT/development/start-vim.sh" "$@"