@olical, I was trying to upgrade using Plug 'Olical/conjure', {'tag': 'v3.5.0'}
as per the README. And I got fatal: invalid reference: v3.5.0
. Looking at the releases page, it looks like you tagged it to v3.6.0: https://github.com/Olical/conjure/releases
Good catch, thank you! I've corrected it to v3.5.0, I got mixed up in my version bumping!
Cheers Oli!
No problem! Apologies for the off by one confusion 😅
So that
{
false 0.3
true 3
}
behaviour is known and expected. If you're importing nvim values into lua you need to duck type check for a table that looks like this and take the false value if so.
Check out :h vim.types
for more info on this. Hopefully this is the only roadblock in getting config into g:conjure
, I've already paved over it(defn get-in [ks]
(let [v (a.get-in (root) ks)]
(if (and (a.table? v)
(. v vim.type_idx)
(. v vim.val_idx))
(. v vim.val_idx)
v)))
Hmm, second thought, nested maps are probably awful to work with for setting config in viml.
Counter point: If you're setting config before conjure loads you can just do let g:conjure = { ... }
and nest as much as you want. Then if Conjure is already loaded all of the dicts will already be defined, so let g:conjure.foo.bar.baz = ...
should be fine too.
I think I have to find a way to have a flat map, so instead of setting g:conjure.foo.bar you’d set g:conjure_foo_bar.
Also the wiki is now editable by anyone, go wild if you want to add more articles / guides / info. I’m totally okay with you adding your own blog posts there.
Thinking of mapping all config into flat global values, like g:conjure_mapping_prefix
, I think this is the simplest approach for users.
No worrying about "are these intermediate dictionaries defined" if I use nested dictionaries.
The only downside I can think of is that there's no one place to get all config values, you have to interrogate each one.