Docs #1
@@ -122,8 +122,8 @@ no extra plugin.
|
||||
### Try it without touching your config
|
||||
|
||||
```sh
|
||||
./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-nvim.sh # spawns Neovim against an isolated sample wiki
|
||||
./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
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
# $XDG_CACHE_HOME/nuwiki-dev/wiki
|
||||
# * calls `require('nuwiki').setup({...})`
|
||||
#
|
||||
# Usage: ./start-nvim.sh [extra args...]
|
||||
# ./start-nvim.sh # open the scratch wiki's index
|
||||
# ./start-nvim.sh path/to/note.wiki # open a specific file
|
||||
# NUWIKI_DEV_WIKI=/tmp/foo ./start-nvim.sh
|
||||
# NUWIKI_DEV_SKIP_BUILD=1 ./start-nvim.sh # reuse the cached binary
|
||||
# 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
|
||||
#
|
||||
# The release binary is rebuilt on every launch so source changes
|
||||
# always reach the running LSP. `cargo build --release` is incremental,
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
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"
|
||||
WIKI_DIR="${NUWIKI_DEV_WIKI:-$DEV_DIR/wiki}"
|
||||
INIT_FILE="$DEV_DIR/init.lua"
|
||||
@@ -7,13 +7,13 @@
|
||||
# the dev cache on first run so the LSP integration is exercisable
|
||||
# without polluting your real Vim install.
|
||||
#
|
||||
# Usage: ./start-vim.sh [extra args...]
|
||||
# ./start-vim.sh # open the scratch wiki's index
|
||||
# ./start-vim.sh path/to/note.wiki # open a specific file
|
||||
# NUWIKI_DEV_WIKI=/tmp/foo ./start-vim.sh
|
||||
# NUWIKI_DEV_NO_LSP=1 ./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_SKIP_BUILD=1 ./start-vim.sh # reuse the cached binary
|
||||
# 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
|
||||
#
|
||||
# The release binary is rebuilt on every launch so source changes
|
||||
# always reach the running LSP. `cargo build --release` is incremental,
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
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"
|
||||
WIKI_DIR="${NUWIKI_DEV_WIKI:-$DEV_DIR/wiki}"
|
||||
VIMRC="$DEV_DIR/vimrc"
|
||||
@@ -12,14 +12,14 @@
|
||||
# under $XDG_CACHE_HOME/nuwiki-dev/ so your real Vim install stays untouched.
|
||||
#
|
||||
# Usage:
|
||||
# ./test-personal-wiki.sh # open index.wiki
|
||||
# ./test-personal-wiki.sh path/to/note.wiki # open a specific file
|
||||
# NUWIKI_PERSONAL_WIKI=/other/path ./test-personal-wiki.sh
|
||||
# NUWIKI_DEV_SKIP_BUILD=1 ./test-personal-wiki.sh # reuse the cached binary
|
||||
# ./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
|
||||
|
||||
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}"
|
||||
|
||||
if [[ ! -d "$WIKI_DIR" ]]; then
|
||||
@@ -31,4 +31,4 @@ fi
|
||||
export NUWIKI_DEV_WIKI="$WIKI_DIR"
|
||||
export NUWIKI_DEV_NO_SEED=1
|
||||
|
||||
exec "$REPO_ROOT/start-vim.sh" "$@"
|
||||
exec "$REPO_ROOT/scripts/start-vim.sh" "$@"
|
||||
Reference in New Issue
Block a user