diff options
author | eug-vs <eugene@eug-vs.xyz> | 2024-05-23 15:33:04 +0200 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2024-05-23 15:33:04 +0200 |
commit | bb81e5432f199729627c1e166fd9d4a3801cda89 (patch) | |
tree | 796ac5597eae975a890e4aac0a9bb93426950398 /nvim/.config/nvim/lua/plugins/zettelkasten.lua | |
parent | 69ecf60fac9b950e373e6bf69c4e631f5acf7445 (diff) | |
download | dotfiles-bb81e5432f199729627c1e166fd9d4a3801cda89.tar.gz |
chore(nvim): add .stulya.toml
Diffstat (limited to 'nvim/.config/nvim/lua/plugins/zettelkasten.lua')
-rw-r--r-- | nvim/.config/nvim/lua/plugins/zettelkasten.lua | 69 |
1 files changed, 32 insertions, 37 deletions
diff --git a/nvim/.config/nvim/lua/plugins/zettelkasten.lua b/nvim/.config/nvim/lua/plugins/zettelkasten.lua index e802545..626cb7c 100644 --- a/nvim/.config/nvim/lua/plugins/zettelkasten.lua +++ b/nvim/.config/nvim/lua/plugins/zettelkasten.lua @@ -1,43 +1,38 @@ return { - "mickael-menu/zk-nvim", - init = function() - require("zk").setup({ - picker = "telescope", - lsp = { - config = { - cmd = { "zk", "lsp" }, - name = "zk", - -- TODO: do I need this? Seems to work without - -- on_attach = on_attach, - -- flags = flags, - -- capabilities = capabilities, - }, + 'mickael-menu/zk-nvim', + init = function() + require('zk').setup { + picker = 'telescope', + lsp = { + config = { + cmd = { 'zk', 'lsp' }, + name = 'zk', + -- TODO: do I need this? Seems to work without + -- on_attach = on_attach, + -- flags = flags, + -- capabilities = capabilities, + }, - -- automatically attach buffers in a zk notebook that match the given filetypes - auto_attach = { - enabled = true, - filetypes = { "markdown" }, - }, - }, - }) - local opts = { noremap = true, silent = false } + -- automatically attach buffers in a zk notebook that match the given filetypes + auto_attach = { + enabled = true, + filetypes = { 'markdown' }, + }, + }, + } + local opts = { noremap = true, silent = false } - -- Create a new note after asking for its title. - vim.api.nvim_set_keymap("n", "<leader>zn", "<Cmd>ZkNew { title = vim.fn.input('Title: ') }<CR>", opts) + -- Create a new note after asking for its title. + vim.api.nvim_set_keymap('n', '<leader>zn', "<Cmd>ZkNew { title = vim.fn.input('Title: ') }<CR>", opts) - -- Open notes. - vim.api.nvim_set_keymap("n", "<leader>zz", "<Cmd>ZkNotes { sort = { 'modified' } }<CR>", opts) - -- Open notes associated with the selected tags. - vim.api.nvim_set_keymap("n", "<leader>zt", "<Cmd>ZkTags<CR>", opts) + -- Open notes. + vim.api.nvim_set_keymap('n', '<leader>zz', "<Cmd>ZkNotes { sort = { 'modified' } }<CR>", opts) + -- Open notes associated with the selected tags. + vim.api.nvim_set_keymap('n', '<leader>zt', '<Cmd>ZkTags<CR>', opts) - -- Search for the notes matching a given query. - vim.api.nvim_set_keymap( - "n", - "<leader>zf", - "<Cmd>ZkNotes { sort = { 'modified' }, match = { vim.fn.input('Search: ') } }<CR>", - opts - ) - -- Search for the notes matching the current visual selection. - vim.api.nvim_set_keymap("v", "<leader>zf", ":'<,'>ZkMatch<CR>", opts) - end, + -- Search for the notes matching a given query. + vim.api.nvim_set_keymap('n', '<leader>zf', "<Cmd>ZkNotes { sort = { 'modified' }, match = { vim.fn.input('Search: ') } }<CR>", opts) + -- Search for the notes matching the current visual selection. + vim.api.nvim_set_keymap('v', '<leader>zf', ":'<,'>ZkMatch<CR>", opts) + end, } |