feat(calendar): integrate calendar-vim with wiki diary paths
Wire g:calendar_action/g:calendar_sign to nuwiki diary hooks that resolve diary paths from the wiki root config instead of calendar-vim's default ~/diary. Auto-detected on FileType vimwiki when calendar-vim is present; opt out with g:nuwiki_use_calendar=0 or g:nuwiki_no_calendar. - autoload/nuwiki/diary.vim: calendar_action/calendar_sign using wiki cfg; open diary in the previous window and close the calendar window after. - autoload/vimwiki/diary.vim: vimwiki# aliases for drop-in compatibility. - plugin/nuwiki.vim + lua/nuwiki/init.lua: auto-wire hooks, overwriting calendar-vim's defaults while respecting user-set custom hooks. - lua/nuwiki/config.lua: add use_calendar option (on by default). - development/start-*.sh + _common.sh: clone calendar-vim, fix vimrc var expansion, pass wiki root to the Vim/Neovim clients.
This commit is contained in:
@@ -275,6 +275,20 @@ reset_dirs() {
|
||||
done
|
||||
}
|
||||
|
||||
# ensure_calendar_vim — clone calendar-vim into dev dir for testing
|
||||
ensure_calendar_vim() {
|
||||
local repo="$DEV_DIR/calendar-vim"
|
||||
if [[ -d "$repo/.git" ]]; then
|
||||
return
|
||||
fi
|
||||
if ! command -v git >/dev/null 2>&1; then
|
||||
log "git not found — skipping calendar-vim"
|
||||
return 1
|
||||
fi
|
||||
log "cloning https://github.com/mattn/calendar-vim.git → $repo"
|
||||
git clone --depth 1 https://github.com/mattn/calendar-vim.git "$repo" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
seed_wiki() {
|
||||
if [[ "${NUWIKI_DEV_NO_SEED:-0}" == "1" ]]; then
|
||||
log "NUWIKI_DEV_NO_SEED=1 — skipping wiki seed (using $WIKI_DIR as-is)"
|
||||
|
||||
Reference in New Issue
Block a user