Convert plugin settings to Lua

How would you convert a plugin setting like let g:airline#extensions#fzf#enabled = 1 using the vim api? Mainly I am a little confused as to what exactly the # symbol is doing here and how I would convert that to a vim.g call

vim.g['airline#extensions#fzf#enabled'] = 1 should work I think (you have to use the brackets and quotes to specify keys that aren’t valid in Lua code, like # characters).

3 Likes

So I gave that a try and I got a lua error saying it was missing a field.

EDIT: Nevermind, I typed g.[ haha I think it is working now, thanks Smolck

1 Like