You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm willing to help fix the problem and contribute a pull request
Describe the bug
I'm not really sure how to reliably reproduce this.
If I leave an nvim session over night, I will notice this pretty reliably.
Restarting nvim will fix the issue.
E5108: Error executing lua: .../njnygaard/.local/share/nvim/lazy/zk-nvim/lua/zk/api.lua:19: attempt to index a nil value
stack traceback:
.../njnygaard/.local/share/nvim/lazy/zk-nvim/lua/zk/api.lua:19: in function 'execute_command'
.../njnygaard/.local/share/nvim/lazy/zk-nvim/lua/zk/api.lua:61: in function 'list'
/Users/njnygaard/.local/share/nvim/lazy/zk-nvim/lua/zk.lua:103: in function 'pick_notes'
/Users/njnygaard/.local/share/nvim/lazy/zk-nvim/lua/zk.lua:131: in function 'edit'
...ocal/share/nvim/lazy/zk-nvim/lua/zk/commands/builtin.lua:61: in function <...ocal/share/nvim/lazy/zk-nvim/lua/zk/commands/builtin.lua:60>
...d/development/dot-files/.config/nvim/after/plugin/zk.lua:44: in function <...d/development/dot-files/.config/nvim/after/plugin/zk.lua:43>
How to reproduce?
Leave a note open for 24h
:ZkNotes
Get error.
zk configuration
[notebook]
[note]
language = "en"default-title = "Untitled"filename = "{{slug title}}"extension = "md"template = "default.md"id-charset = "alphanum"id-length = 6id-case = "lower"
[group.journal]
paths = ["journal"]
[group.journal.note]
filename = "{{format-date now}}"extension = "md"template = "journal.md"
[format.markdown]
hashtags = falsecolon-tags = falsemultiword-tags = false
[tool]
editor = "nvim"shell = "/bin/zsh"pager = "less -FIRX"fzf-preview = "bat -p --color always {-1}"
[filter]
recents = "--sort created- --created-after 'last two weeks'"
[alias]
# Edit the last modified note.#edlast = "zk edit --limit 1 --sort modified- $@"# Edit the notes selected interactively among the notes created the last two weeks.#recent = "zk edit --sort created- --created-after 'last two weeks' --interactive"# Show a random note.#lucky = "zk list --quiet --format full --sort random --limit 1"
[lsp]
[lsp.diagnostics]
# Report titles of wiki-links as hints.wiki-title = "hint"# Warn for dead links between notes.dead-link = "error"
[lsp.completion]
# Show the note title in the completion pop-up, or fallback on its path if empty.note-label = "{{title}}"# Filter out the completion pop-up using the note title or its path.note-filter-text = "{{title}}"# Show the note filename without extension as detail.note-detail = "{{title}}"use-additional-text-edits = true
Neovim configuration
There'sa lot in there and multiple files.
I'm not sure what to post.
Here's the zk-nvim specific file (telescope):
require("zk").setup({
-- Can be "telescope", "fzf", "fzf_lua"or"select" (`vim.ui.select`).
-- It's recommended to use "telescope", "fzf"or"fzf_lua".
picker ="telescope",
lsp= {
-- `config` is passed to `vim.lsp.start_client(config)`
config = {
cmd = { "zk", "lsp" },
name ="zk",
-- on_attach =...-- etc, see `:hvim.lsp.start_client()`
},
-- Automatically attach buffersinazk notebook that match the given filetypes.
auto_attach = {
enabled = true,
filetypes = { "markdown" },
},
},
})
-- Create anew note after asking for its title.
vim.keymap.set("n", "<leader>zn", function()
local title=vim.fn.input("Title: ")
require("zk.commands").get("ZkNew")(
{
dir="unsorted",
title=title,
})
end)
-- Open notes associated with the selected tags.
vim.keymap.set("n", "<leader>zt", function()
require("zk.commands").get("ZkTags")(
{
sort="modified",
})
end)
-- Open notes, recently modifiedfirst.
vim.keymap.set("n", "<leader>zo", function()
require("zk.commands").get("ZkNotes")({
sort= { "modified" },
})
end)
### Environment
```bash
zk 0.14.1
uname: illegal option -- o
usage: uname [-amnprsv]
system:
NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1713773202
Run "nvim -V1 -v" for more info
The text was updated successfully, but these errors were encountered:
Check if applicable
Describe the bug
I'm not really sure how to reliably reproduce this.
If I leave an nvim session over night, I will notice this pretty reliably.
Restarting nvim will fix the issue.
How to reproduce?
:ZkNotes
zk configuration
Neovim configuration
The text was updated successfully, but these errors were encountered: