Move development scripts into development/, leaving scripts/ plugin-only
CI / cargo fmt --check (push) Successful in 32s
CI / cargo clippy (push) Successful in 25s
CI / cargo test (push) Successful in 33s
CI / cargo fmt --check (pull_request) Successful in 30s
CI / cargo clippy (pull_request) Successful in 49s
CI / cargo test (pull_request) Successful in 43s
CI / editor keymaps (push) Successful in 1m49s
CI / editor keymaps (pull_request) Successful in 1m36s
CI / cargo fmt --check (push) Successful in 32s
CI / cargo clippy (push) Successful in 25s
CI / cargo test (push) Successful in 33s
CI / cargo fmt --check (pull_request) Successful in 30s
CI / cargo clippy (pull_request) Successful in 49s
CI / cargo test (pull_request) Successful in 43s
CI / editor keymaps (push) Successful in 1m49s
CI / editor keymaps (pull_request) Successful in 1m36s
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 <noreply@anthropic.com>
This commit is contained in:
@@ -93,6 +93,6 @@ jobs:
|
|||||||
sudo apt-get install -y --no-install-recommends vim
|
sudo apt-get install -y --no-install-recommends vim
|
||||||
vim --version | head -1
|
vim --version | head -1
|
||||||
- name: run Neovim keymap harness
|
- name: run Neovim keymap harness
|
||||||
run: ./scripts/test-keymaps.sh
|
run: ./development/test-keymaps.sh
|
||||||
- name: run Vim keymap harness
|
- name: run Vim keymap harness
|
||||||
run: ./scripts/test-keymaps-vim.sh
|
run: ./development/test-keymaps-vim.sh
|
||||||
|
|||||||
@@ -122,8 +122,8 @@ no extra plugin.
|
|||||||
### Try it without touching your config
|
### Try it without touching your config
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
./scripts/start-nvim.sh # spawns Neovim against an isolated sample wiki
|
./development/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-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
|
Both scripts build the LSP binary, seed a scratch wiki, and launch the
|
||||||
|
|||||||
@@ -65,9 +65,21 @@ nuwiki/
|
|||||||
├── doc/ # Vim help documentation
|
├── doc/ # Vim help documentation
|
||||||
│ └── nuwiki.txt
|
│ └── nuwiki.txt
|
||||||
│
|
│
|
||||||
├── scripts/
|
├── scripts/ # Plugin-runtime scripts only
|
||||||
│ └── download_bin.vim # VimL binary download (used by Dein/vim-plug build hooks)
|
│ └── 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/
|
└── .gitea/
|
||||||
└── workflows/
|
└── workflows/
|
||||||
├── ci.yaml # Lint, test, fmt check on every push/PR
|
├── ci.yaml # Lint, test, fmt check on every push/PR
|
||||||
|
|||||||
@@ -10,11 +10,11 @@
|
|||||||
# $XDG_CACHE_HOME/nuwiki-dev/wiki
|
# $XDG_CACHE_HOME/nuwiki-dev/wiki
|
||||||
# * calls `require('nuwiki').setup({...})`
|
# * calls `require('nuwiki').setup({...})`
|
||||||
#
|
#
|
||||||
# Usage: ./scripts/start-nvim.sh [extra args...]
|
# Usage: ./development/start-nvim.sh [extra args...]
|
||||||
# ./scripts/start-nvim.sh # open the scratch wiki's index
|
# ./development/start-nvim.sh # open the scratch wiki's index
|
||||||
# ./scripts/start-nvim.sh path/to/note.wiki # open a specific file
|
# ./development/start-nvim.sh path/to/note.wiki # open a specific file
|
||||||
# NUWIKI_DEV_WIKI=/tmp/foo ./scripts/start-nvim.sh
|
# NUWIKI_DEV_WIKI=/tmp/foo ./development/start-nvim.sh
|
||||||
# NUWIKI_DEV_SKIP_BUILD=1 ./scripts/start-nvim.sh # reuse the cached binary
|
# NUWIKI_DEV_SKIP_BUILD=1 ./development/start-nvim.sh # reuse the cached binary
|
||||||
#
|
#
|
||||||
# The release binary is rebuilt on every launch so source changes
|
# The release binary is rebuilt on every launch so source changes
|
||||||
# always reach the running LSP. `cargo build --release` is incremental,
|
# always reach the running LSP. `cargo build --release` is incremental,
|
||||||
@@ -7,13 +7,13 @@
|
|||||||
# the dev cache on first run so the LSP integration is exercisable
|
# the dev cache on first run so the LSP integration is exercisable
|
||||||
# without polluting your real Vim install.
|
# without polluting your real Vim install.
|
||||||
#
|
#
|
||||||
# Usage: ./scripts/start-vim.sh [extra args...]
|
# Usage: ./development/start-vim.sh [extra args...]
|
||||||
# ./scripts/start-vim.sh # open the scratch wiki's index
|
# ./development/start-vim.sh # open the scratch wiki's index
|
||||||
# ./scripts/start-vim.sh path/to/note.wiki # open a specific file
|
# ./development/start-vim.sh path/to/note.wiki # open a specific file
|
||||||
# NUWIKI_DEV_WIKI=/tmp/foo ./scripts/start-vim.sh
|
# NUWIKI_DEV_WIKI=/tmp/foo ./development/start-vim.sh
|
||||||
# NUWIKI_DEV_NO_LSP=1 ./scripts/start-vim.sh # skip vim-lsp setup
|
# NUWIKI_DEV_NO_LSP=1 ./development/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_NO_SEED=1 ./development/start-vim.sh # use WIKI_DIR as-is (no scratch seeding)
|
||||||
# NUWIKI_DEV_SKIP_BUILD=1 ./scripts/start-vim.sh # reuse the cached binary
|
# NUWIKI_DEV_SKIP_BUILD=1 ./development/start-vim.sh # reuse the cached binary
|
||||||
#
|
#
|
||||||
# The release binary is rebuilt on every launch so source changes
|
# The release binary is rebuilt on every launch so source changes
|
||||||
# always reach the running LSP. `cargo build --release` is incremental,
|
# always reach the running LSP. `cargo build --release` is incremental,
|
||||||
@@ -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_,
|
" Usage: open a .wiki file with VARIED markup (heading, *bold*, _italic_,
|
||||||
" `code`), then:
|
" `code`), then:
|
||||||
" :source scripts/syntax-diag.vim
|
" :source development/syntax-diag.vim
|
||||||
" Then paste /tmp/nuwiki-syndiag.log back.
|
" Then paste /tmp/nuwiki-syndiag.log back.
|
||||||
|
|
||||||
redir! > /tmp/nuwiki-syndiag.log
|
redir! > /tmp/nuwiki-syndiag.log
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
#!/usr/bin/env bash
|
#!/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 (`<C-Space>`,
|
# Pure-VimL portion only. The LSP-roundtrip keymaps (`<C-Space>`,
|
||||||
# `=`, `-`, …) talk to the server via vim-lsp's timer-driven async
|
# `=`, `-`, …) talk to the server via vim-lsp's timer-driven async
|
||||||
# layer, which doesn't fire reliably inside `vim -e -s`. Those have
|
# 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.
|
# Lua command layer + server binary.
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
@@ -47,7 +47,7 @@ log "running harness…"
|
|||||||
# `</dev/null` so Vim's ex-mode doesn't hang waiting on stdin;
|
# `</dev/null` so Vim's ex-mode doesn't hang waiting on stdin;
|
||||||
# `timeout` so a misbehaving script can't stall CI for 30 minutes.
|
# `timeout` so a misbehaving script can't stall CI for 30 minutes.
|
||||||
NUWIKI_KEYMAP_RESULTS="$RESULTS" \
|
NUWIKI_KEYMAP_RESULTS="$RESULTS" \
|
||||||
timeout 30 vim -e -s -u "$VIMRC" -c "edit $SEED" -c "source $REPO_ROOT/scripts/test-keymaps-vim.vim" \
|
timeout 30 vim -e -s -u "$VIMRC" -c "edit $SEED" -c "source $REPO_ROOT/development/test-keymaps-vim.vim" \
|
||||||
</dev/null >"$TMP/vim.log" 2>&1 || true
|
</dev/null >"$TMP/vim.log" 2>&1 || true
|
||||||
|
|
||||||
if [[ ! -f "$RESULTS" ]]; then
|
if [[ ! -f "$RESULTS" ]]; then
|
||||||
@@ -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
|
" Pure-VimL keymap regression suite. Plain Vim's LSP path
|
||||||
" (vim-lsp + async.vim) talks to the server via timers, which won't
|
" (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
|
" are restricted to the bindings whose RHS is implemented entirely in
|
||||||
" VimL (header/link nav, `o`/`O` bullet continuation, the wrap step
|
" VimL (header/link nav, `o`/`O` bullet continuation, the wrap step
|
||||||
" of `<CR>`). LSP-roundtrip bindings (`<C-Space>`, `=`, `-`, …) get
|
" of `<CR>`). LSP-roundtrip bindings (`<C-Space>`, `=`, `-`, …) 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.
|
" — same Lua codepath, same server.
|
||||||
|
|
||||||
let s:results = []
|
let s:results = []
|
||||||
@@ -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
|
-- Headless Neovim harness for the buffer-local keymaps registered by
|
||||||
-- `ftplugin/vimwiki.vim` + `lua/nuwiki/keymaps.lua`. Each case sets up
|
-- `ftplugin/vimwiki.vim` + `lua/nuwiki/keymaps.lua`. Each case sets up
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/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.
|
# headless Neovim and report pass/fail per buffer-local keymap.
|
||||||
#
|
#
|
||||||
# The Lua harness needs a real LSP attachment (most keymaps dispatch
|
# The Lua harness needs a real LSP attachment (most keymaps dispatch
|
||||||
@@ -53,7 +53,7 @@ log "running harness…"
|
|||||||
# stalling CI runners indefinitely.
|
# stalling CI runners indefinitely.
|
||||||
NUWIKI_KEYMAP_RESULTS="$RESULTS" \
|
NUWIKI_KEYMAP_RESULTS="$RESULTS" \
|
||||||
timeout 60 nvim --clean -u "$INIT" --headless "$TMP/wiki/index.wiki" \
|
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
|
>"$TMP/nvim.log" 2>&1 || true
|
||||||
|
|
||||||
if [[ ! -f "$RESULTS" ]]; then
|
if [[ ! -f "$RESULTS" ]]; then
|
||||||
@@ -12,10 +12,10 @@
|
|||||||
# under $XDG_CACHE_HOME/nuwiki-dev/ so your real Vim install stays untouched.
|
# under $XDG_CACHE_HOME/nuwiki-dev/ so your real Vim install stays untouched.
|
||||||
#
|
#
|
||||||
# Usage:
|
# Usage:
|
||||||
# ./scripts/test-personal-wiki.sh # open index.wiki
|
# ./development/test-personal-wiki.sh # open index.wiki
|
||||||
# ./scripts/test-personal-wiki.sh path/to/note.wiki # open a specific file
|
# ./development/test-personal-wiki.sh path/to/note.wiki # open a specific file
|
||||||
# NUWIKI_PERSONAL_WIKI=/other/path ./scripts/test-personal-wiki.sh
|
# NUWIKI_PERSONAL_WIKI=/other/path ./development/test-personal-wiki.sh
|
||||||
# NUWIKI_DEV_SKIP_BUILD=1 ./scripts/test-personal-wiki.sh # reuse the cached binary
|
# NUWIKI_DEV_SKIP_BUILD=1 ./development/test-personal-wiki.sh # reuse the cached binary
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
@@ -31,4 +31,4 @@ fi
|
|||||||
export NUWIKI_DEV_WIKI="$WIKI_DIR"
|
export NUWIKI_DEV_WIKI="$WIKI_DIR"
|
||||||
export NUWIKI_DEV_NO_SEED=1
|
export NUWIKI_DEV_NO_SEED=1
|
||||||
|
|
||||||
exec "$REPO_ROOT/scripts/start-vim.sh" "$@"
|
exec "$REPO_ROOT/development/start-vim.sh" "$@"
|
||||||
Reference in New Issue
Block a user