nvim: Enter notes dir when calling zettel index

When switching the current buffer to the Zettelkasten index page
(`<leader>ni`), we now also switch the working directory to the
corresponding notes directory.
This commit is contained in:
Marty Oehme 2024-02-05 14:55:09 +01:00
parent 20b9d432ac
commit 22b70a0639
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A
3 changed files with 20 additions and 13 deletions

View file

@ -103,6 +103,9 @@ local prose_plugs = {
-- simple static markdown linking and link following using zettel IDs
{
"marty-oehme/zettelkasten.nvim",
dependencies = {
"mickael-menu/zk-nvim", -- for the CD when opening index
},
ft = writing_ft,
keys = {
{
@ -122,6 +125,7 @@ local prose_plugs = {
{
"<leader>ni",
function()
require("zk.commands").get("ZkCd")()
require("zettelkasten").index_open()
end,
desc = "index page",