refactor(nvim)!: add opts option
This commit is contained in:
parent
12a5420ee9
commit
6a125a1df6
27 changed files with 273 additions and 238 deletions
27
modules/programs/nvim/plugins/lua/zettelkasten-nvim.lua
Normal file
27
modules/programs/nvim/plugins/lua/zettelkasten-nvim.lua
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
local telekasten = require("telekasten")
|
||||
telekasten.setup({
|
||||
home = vim.fn.expand("~/Nextcloud/Notes/zettelkasten"),
|
||||
auto_set_filetype = false,
|
||||
image_subdir = "assets",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufReadPost", "BufNewFile" }, {
|
||||
pattern = "*/zettelkasten/*",
|
||||
callback = function(_)
|
||||
require("which-key").register({
|
||||
g = {
|
||||
f = { telekasten.follow_link, "Follow link" },
|
||||
r = { telekasten.show_backlinks, "Show backlinks" },
|
||||
},
|
||||
["<leader>"] = {
|
||||
f = {
|
||||
f = { telekasten.find_notes, "Find note" },
|
||||
n = { telekasten.new_note, "New note" },
|
||||
},
|
||||
s = {
|
||||
g = { telekasten.search_note, "Grep notes" },
|
||||
},
|
||||
},
|
||||
}, { buffer = vim.fn.bufnr("%") })
|
||||
end,
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue