Total lua / nvim noob, but I just had a pain trying to install and configure github.com/vimwiki/vimwiki which I've used previously on vanilla vim. I read through the mountain of text prior to the first vim.o.* line and expected to find something about the order that variables are set; but didn't find anything.
Turns out global variables need to be declared prior to the plugins being loaded? Any time before the lazy installer is fine? I will add a pull request to the documentation over there to add "some" sort of lazy installation & configuration instructions.
I am now using and is working:
vim.g.vimwiki_path = '~/vimwiki/'
vim.g.vimwiki_syntax = 'markdown'
vim.g.vimwiki_ext = 'md'
-- Setup lazy.nvim path
--...
require('lazy').setup({
'vimwiki/vimwiki'
--...
})