0

I am struggling with the basic configuration for vimwiki in neovim. I cannot get it to use my configuration. For import I am using lazy.nvim. This is the concerning lazy-section:

    {"vimwiki/vimwiki", 
    config = function() 
        vim.g.vimwiki_list = {
            {
            path = '~/docs/vimwiki',
            syntax = 'default',
            ext = '.wiki',
            },
        }
    end,
    },

1 Answer 1

0

By reading the docs for lazy.nvim I found out that you should use init() instead of config().

        {"vimwiki/vimwiki", 
    init = function() 
        vim.g.vimwiki_list = {
            {
            path = '~/docs/vimwiki',
            syntax = 'default',
            ext = '.wiki',
            },
        }
    end,
    },

This is because vimwiki needs to know the vimwiki_list before loading, to know where to find all wikis. init() loads always and config() just loads when the plugin loads.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.