firenvim icon indicating copy to clipboard operation
firenvim copied to clipboard

Add Lua config example

Open bas-ie opened this issue 3 years ago • 4 comments

Add an example of setting the configuration object from a Lua file. See: https://github.com/glacambre/firenvim/issues/1391

bas-ie avatar Aug 06 '22 02:08 bas-ie

Thank you for taking the time to do this, but what I had in mind for #1391 was to convert all of the vimscript examples (except the package-manager ones) to lua.

glacambre avatar Aug 06 '22 12:08 glacambre

Oh, all of 'em? I could probably do that, though you may find that not everyone has jumped on board the init.lua train just yet :laughing:

bas-ie avatar Aug 07 '22 21:08 bas-ie

not everyone has jumped on board the init.lua train just yet

I know, I'm one of these luddites :). But new users (the ones that tend to ask questions) are more likely to know Lua than VimScript, while VimScript users are likely to know (or be able to figure out) how to convert a Lua snippet to VimScript.

glacambre avatar Aug 08 '22 05:08 glacambre

Ditoo to what @glacambre said. I suggest the default full configuration be shown as Lua with as ergonomic an interface as possible (c.f. #1405). For old geezers that still have our main configurations in Vimscript we can fend for ourselves. We mostly already have our configurations setup. As a nod to those who don't know how to switch you can ⓐ link back in the docs to the docs right before the Lua config documentation merge, ⓑ include a small sample snippet in vimscript format, and ⓒ show how to use a block of Lua code inside a vimscript style rc script to just use the Lua version there without porting the full configuration.

alerque avatar Aug 08 '22 19:08 alerque

I actually spent a bit of time trying to figure out how fields with special characters work in lua until I found this example.

Even though it might not be complete, this PR alone would already give people with basic but not advanced lua experience some pointers how to config firenvim in lua. Thanks!

chrisgrieser avatar Oct 03 '22 10:10 chrisgrieser