2022-10-25 18:35:51 +08:00
|
|
|
--=============================================================================
|
|
|
|
-- zettelkasten.lua --- init plugin for zk
|
2023-03-26 13:44:47 +08:00
|
|
|
-- Copyright (c) 2016-2023 Wang Shidong & Contributors
|
2022-10-25 18:35:51 +08:00
|
|
|
-- Author: Wang Shidong < wsdjeg@outlook.com >
|
|
|
|
-- URL: https://spacevim.org
|
|
|
|
-- License: GPLv3
|
|
|
|
--=============================================================================
|
2024-12-10 22:45:40 +08:00
|
|
|
vim.cmd([[command ZkNew :lua require('zettelkasten').zknew({})]])
|
2022-10-18 22:55:34 +08:00
|
|
|
|
2024-12-10 22:45:40 +08:00
|
|
|
vim.cmd([[command ZkListTemplete :Telescope zettelkasten_template]])
|
|
|
|
vim.cmd([[command ZkListTags :Telescope zettelkasten_tags]])
|
2024-07-05 23:11:59 +08:00
|
|
|
|
2024-12-10 22:45:40 +08:00
|
|
|
vim.api.nvim_create_user_command('ZkBrowse', function(opt)
|
|
|
|
require('zettelkasten.browser').browse(opt.fargs)
|
|
|
|
end, { nargs = '*' })
|
2022-10-18 22:55:34 +08:00
|
|
|
_G.zettelkasten = {
|
2024-12-10 22:45:40 +08:00
|
|
|
tagfunc = require('zettelkasten').tagfunc,
|
|
|
|
completefunc = require('zettelkasten').completefunc,
|
|
|
|
zknew = require('zettelkasten').zknew,
|
|
|
|
zkbrowse = function()
|
|
|
|
vim.cmd('edit zk://browser')
|
|
|
|
end,
|
2022-10-18 22:55:34 +08:00
|
|
|
}
|