Open blastmaster opened 1 week ago
I just ran ZkNew { dir = "journal", date = "today" }
(replacing dir with a directry I have) without issue.
If they're working from a non-zk buffer then ... I'm confused. Would've expected it to at least be the other way around.
I would ask you to fully close all running instances of neovim, navigate to the root dir of your notebook, and try again.
What happens if you just run :ZkNew
?
Also, there have been a few changes since your zk
version. Maybe rebuild just for the sake of it. Latest is zk 0.14.1-23-gbe5bd76
Running ZkNew
from an empty buffer works as expected. Just from inside a Zk buffer I got the error.
I will try updating zk
version.
Ok, I've updated the zk to version zk 0.14.1-28-g73092a6
Just running :ZkNew
without any args as neovim command works in every kind of buffer.
Using the shortcut <leader>zn
as above just works in non-zk buffers but not in zk-buffers.
To be more concrete, as soon as I pass parameters to the ZKNew
I've got the error also :ZkNew { title = "blub" }
results in the E488 Trailing characters: { title = "blub" }
but works perfectly well when doing from an non zk-buffer.
Check if applicable
Describe the bug
When executing
ZKNew
commands from inside an zk-buffer in Neovim I'll get an error.E488: Trailing characters:
The command works fine from any other buffer or a fresh neovim session without any file open.How to reproduce?
:ZkNew
with some args. No matter if I try to create a new Note using a keymap like that from your Readme:map("n", "<leader>zn", "<Cmd>ZkNew { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }<CR>", opts)
or doing things by hand like:ZkNew { dir = "journal", date = "today" }
.I'll get the error:
E488: Trailing characters: { dir = "journal", date = "today" }
The same commands and or keymaps work when using them from an non-zk buffer.
zk configuration
Neovim configuration
Environment