summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/plugins/vimwiki.lua
blob: 5f1d66192bbd4577df26281ea1a3af771fbf04ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
return {
    {
        "vimwiki/vimwiki",
        init = function()
            vim.g.vimwiki_list = {
                {
                    path = '/home/yigit/nextcloud/personal_wiki/text',
                    path_html = '/home/yigit/nextcloud/personal_wiki/html',
                    auto_generate_tags = 1,
                    automatic_nested_syntaxes = 1,
                    template_path = '/home/yigit/nextcloud/personal_wiki/templates',
                    template_default = 'default_template',
                    template_ext = '.html',
                    auto_export = 1,
                    auto_tags = 1
                }
            }
            vim.g.vimwiki_global_ext = 0
            vim.g.vimwiki_hl_headers = 1
        end,
        keys = {
            { "<leader>ww", "<cmd>VimwikiIndex<cr>",          "vimwiki: goto wiki" },
            { "<leader>v",  "<cmd>VimwikiToggleListItem<cr>", "vimwiki: toggle checkmark" },
            { "<leader>a",  "<cmd>VimwikiAddHeaderLevel<cr>", "vimwiki: add header level" }
        },
        ft = { "vimwiki" }
    },
}