Add zk
This commit is contained in:
parent
bd7de0c0b8
commit
aed72ef9b1
2 changed files with 54 additions and 0 deletions
52
modules/editor/vim/lua/plugins/zk.lua
Normal file
52
modules/editor/vim/lua/plugins/zk.lua
Normal 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,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue