This commit is contained in:
Paul-Henri Froidmont 2025-11-05 00:24:36 +01:00
parent bd7de0c0b8
commit aed72ef9b1
Signed by: phfroidmont
GPG key ID: BE948AFD7E7873BE
2 changed files with 54 additions and 0 deletions

View file

@ -0,0 +1,52 @@
return {
"zk-org/zk-nvim",
keys = {
{
"<leader>zn",
"<Cmd>ZkNew { title = vim.fn.input('Title: ') }<CR>",
desc = "Create a new note after asking for its title"
},
{
"<leader>zo",
"<Cmd>ZkNotes { sort = { 'modified' } }<CR>",
desc = "Open Notes"
},
{
"<leader>zt",
"<Cmd>ZkTags<CR>",
desc = "Open notes associated with the selected tags"
},
{
"<leader>zf",
"<Cmd>ZkNotes { sort = { 'modified' }, match = { vim.fn.input('Search: ') } }<CR>",
desc = "Search for the notes matching a given query"
},
{
"<leader>zf",
":'<,'>ZkMatch<CR>",
mode = { "v" },
desc = "Search for the notes matching the current visual selection"
},
},
config = function()
require("zk").setup({
picker = "fzf_lua",
lsp = {
-- `config` is passed to `vim.lsp.start(config)`
config = {
name = "zk",
cmd = { "zk", "lsp" },
filetypes = { "markdown" },
-- on_attach = ...
-- etc, see `:h vim.lsp.start()`
},
-- automatically attach buffers in a zk notebook that match the given filetypes
auto_attach = {
enabled = true,
},
},
})
end,
}

View file

@ -131,6 +131,7 @@ in
lazydev-nvim lazydev-nvim
vim-startuptime vim-startuptime
yazi-nvim yazi-nvim
zk-nvim
]; ];
extraPackages = with pkgs; [ extraPackages = with pkgs; [
@ -290,6 +291,7 @@ in
bash-language-server bash-language-server
angular-language-server angular-language-server
vtsls vtsls
zk
]; ];
}; };
}; };