6

As Lua is now built-in as of neovim 0.2 (https://github.com/neovim/neovim/wiki/FAQ), can one use a ~/.config/nvim/init.lua configuration file instead of init.vim?

What would an example of init.lua look like?

Because vimscript is driving me crazy.

Markus
  • 578
  • 6
  • 26
  • 1
    You might be interested in the conversation in this Reddit thread regarding why configuration in Lua would be considered valuable: https://www.reddit.com/r/neovim/comments/6bfn33/any_documentation_on_how_to_use_native_lua/ – Rich Churcher Dec 04 '17 at 22:38
  • 1
    These days you can the [vimpeccable plugin](https://github.com/svermeulen/vimpeccable) to migrate your vimrc to lua fairly easily – Steve Vermeulen Sep 20 '20 at 02:26

2 Answers2

4

Support for init.lua is available now in nightly builds and will be released in Neovim 0.5:

https://github.com/neovim/neovim/issues/7895

Mark Stosberg
  • 12,961
  • 6
  • 44
  • 49
-1

No.

I'm going to go ahead and answer this since the message from core developers seems to have been that VimL will not be replaced for this purpose. See Thiago's comments a few years back on Reddit. To summarise, back then the idea was that Lua would act as a runtime for VimL although that PR eventually stalled due to performance concerns.

So for the time being at least, you can write plugins in Lua but you can't use Lua as the configuration language.

Rich Churcher
  • 7,361
  • 3
  • 37
  • 60