Docs #1

Merged
gffranco merged 15 commits from docs into main 2026-05-30 18:35:41 +00:00
4 changed files with 22 additions and 22 deletions
Showing only changes of commit 9ec1adb3e7 - Show all commits
+2 -2
View File
@@ -122,8 +122,8 @@ no extra plugin.
### Try it without touching your config ### Try it without touching your config
```sh ```sh
./start-nvim.sh # spawns Neovim against an isolated sample wiki ./scripts/start-nvim.sh # spawns Neovim against an isolated sample wiki
./start-vim.sh # same, for plain Vim (clones vim-lsp on first run) ./scripts/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
+6 -6
View File
@@ -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: ./start-nvim.sh [extra args...] # Usage: ./scripts/start-nvim.sh [extra args...]
# ./start-nvim.sh # open the scratch wiki's index # ./scripts/start-nvim.sh # open the scratch wiki's index
# ./start-nvim.sh path/to/note.wiki # open a specific file # ./scripts/start-nvim.sh path/to/note.wiki # open a specific file
# NUWIKI_DEV_WIKI=/tmp/foo ./start-nvim.sh # NUWIKI_DEV_WIKI=/tmp/foo ./scripts/start-nvim.sh
# NUWIKI_DEV_SKIP_BUILD=1 ./start-nvim.sh # reuse the cached binary # NUWIKI_DEV_SKIP_BUILD=1 ./scripts/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,
@@ -27,7 +27,7 @@
set -euo pipefail set -euo pipefail
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
DEV_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/nuwiki-dev" DEV_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/nuwiki-dev"
WIKI_DIR="${NUWIKI_DEV_WIKI:-$DEV_DIR/wiki}" WIKI_DIR="${NUWIKI_DEV_WIKI:-$DEV_DIR/wiki}"
INIT_FILE="$DEV_DIR/init.lua" INIT_FILE="$DEV_DIR/init.lua"
+8 -8
View File
@@ -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: ./start-vim.sh [extra args...] # Usage: ./scripts/start-vim.sh [extra args...]
# ./start-vim.sh # open the scratch wiki's index # ./scripts/start-vim.sh # open the scratch wiki's index
# ./start-vim.sh path/to/note.wiki # open a specific file # ./scripts/start-vim.sh path/to/note.wiki # open a specific file
# NUWIKI_DEV_WIKI=/tmp/foo ./start-vim.sh # NUWIKI_DEV_WIKI=/tmp/foo ./scripts/start-vim.sh
# NUWIKI_DEV_NO_LSP=1 ./start-vim.sh # skip vim-lsp setup # NUWIKI_DEV_NO_LSP=1 ./scripts/start-vim.sh # skip vim-lsp setup
# NUWIKI_DEV_NO_SEED=1 ./start-vim.sh # use WIKI_DIR as-is (no scratch seeding) # NUWIKI_DEV_NO_SEED=1 ./scripts/start-vim.sh # use WIKI_DIR as-is (no scratch seeding)
# NUWIKI_DEV_SKIP_BUILD=1 ./start-vim.sh # reuse the cached binary # NUWIKI_DEV_SKIP_BUILD=1 ./scripts/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,
@@ -25,7 +25,7 @@
set -euo pipefail set -euo pipefail
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
DEV_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/nuwiki-dev" DEV_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/nuwiki-dev"
WIKI_DIR="${NUWIKI_DEV_WIKI:-$DEV_DIR/wiki}" WIKI_DIR="${NUWIKI_DEV_WIKI:-$DEV_DIR/wiki}"
VIMRC="$DEV_DIR/vimrc" VIMRC="$DEV_DIR/vimrc"
@@ -12,14 +12,14 @@
# 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:
# ./test-personal-wiki.sh # open index.wiki # ./scripts/test-personal-wiki.sh # open index.wiki
# ./test-personal-wiki.sh path/to/note.wiki # open a specific file # ./scripts/test-personal-wiki.sh path/to/note.wiki # open a specific file
# NUWIKI_PERSONAL_WIKI=/other/path ./test-personal-wiki.sh # NUWIKI_PERSONAL_WIKI=/other/path ./scripts/test-personal-wiki.sh
# NUWIKI_DEV_SKIP_BUILD=1 ./test-personal-wiki.sh # reuse the cached binary # NUWIKI_DEV_SKIP_BUILD=1 ./scripts/test-personal-wiki.sh # reuse the cached binary
set -euo pipefail set -euo pipefail
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
WIKI_DIR="${NUWIKI_PERSONAL_WIKI:-$HOME/.vimwiki/personal_wiki}" WIKI_DIR="${NUWIKI_PERSONAL_WIKI:-$HOME/.vimwiki/personal_wiki}"
if [[ ! -d "$WIKI_DIR" ]]; then if [[ ! -d "$WIKI_DIR" ]]; then
@@ -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/start-vim.sh" "$@" exec "$REPO_ROOT/scripts/start-vim.sh" "$@"