1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 20:20:05 +08:00
SpaceVim/bundle/vim-zettelkasten/plugin/zettelkasten.lua

28 lines
940 B
Lua
Raw Normal View History

--=============================================================================
-- zettelkasten.lua --- init plugin for zk
2023-03-26 13:44:47 +08:00
-- Copyright (c) 2016-2023 Wang Shidong & Contributors
-- Author: Wang Shidong < wsdjeg@outlook.com >
-- URL: https://spacevim.org
-- License: GPLv3
--=============================================================================
if vim.fn.exists(":ZkNew") == 0 then
vim.cmd([[command ZkNew :lua require('zettelkasten').zknew({})]])
end
if vim.fn.exists(":ZkBrowse") == 0 then
vim.cmd([[command ZkBrowse :lua _G.zettelkasten.zkbrowse()]])
end
2024-07-05 23:11:59 +08:00
if vim.fn.exists(":ZkListTemplete") == 0 then
vim.cmd([[command ZkListTemplete :Telescope zettelkasten_template]])
end
_G.zettelkasten = {
tagfunc = require("zettelkasten").tagfunc,
completefunc = require("zettelkasten").completefunc,
zknew = require("zettelkasten").zknew,
zkbrowse = function()
vim.cmd("edit zk://browser")
end,
}