So, I’ve been a Neovim user for a few years now. I started as most of you (I assume) with vim, and just kept on using and expanding that config file over the years.

I only recently realized there’s quite a split between the Vim and Neovim plugins and that the Neovim community is pushing Lua as a better development platform. From what I can see, some users are switching their configs from Vimscript to Lua. To be honest all I know about Lua is that it means moon in Portuguese…

Should I too? What would the advantages be? What would the disadvantages be? For those who did switch, why did you switch and what was your experience? For those who didn’t why did you not?

p.s. review (roast) my dotfiles

edit: thank you all for your input! I will consider slowly switching to lua by modifying only some parts of the config as some of you suggested.

  • lckdscl [they/them]@whiskers.bim.boats
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    1 year ago

    Advantages

    • Large and growing ecosystem of plugins, documentation, community discussion
    • Better performance than VimScript
    • Lua is a versatile language and it is quite easy, just not as “human readable” as VimScript
    • You have this holy grail

    Disadvantages

    • Time & effort to make the switch
    • Time & effort browsing and installing for new development and plugin
    • Potentially developing an obsession with plugins
    • Time & effort developing plugins yourself
    • You will never get these lost hours back

    In all seriousness, I recommend checking out preconfigured “distros” like LunarVim or NvChad. Here’s my dotfiles.

  • markstos@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 year ago

    I recently switched.

    Expect no noticeable speed difference.

    Two reasons I switched:

    1. Simplicity.  I only have one language to remember and use. 
    2. I hated VimScript. It seems like a config file syntax that should never grown into a full programming language. Lua is simple and pleasant to learn and use.
  • mawkler
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 year ago

    It should be noted that as long as you’re on Neovim you can still keep your VimScript plugins and your VimScript config and gradually start using Lua plugins and Lua scripting. You don’t need to do a complete rewrite over night.

    There’s no real downside to switching to Neovim. It’s basically a superset of Vim, only with better defaults and more capabilities that you can opt-in to if you’d like (Treesitter, native LSP client, Lua, etc.).

    • wisefoolkp@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      Started out this way like a month ago and now am already modifying and writting simple plugins and I dont feel like any time was wasted… I think its the go to way if you are time constrained and still need to have modern vim plugin integration

  • mrmanager@lemmy.today
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    1 year ago

    Yes you should.

    It’s not hard to learn once you get over that first stage of not even knowing what a lua table is, and mentally accepts that arrays start at 1, not 0 :)

  • ScreaminOctopus@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    Switched a few years back when I decided to mostly rewrite my config from scratch. It’s definitely nice to use a normal programming language for your config, plus I’ve been doing a few things here and there that I never would have bothered with if I was still using vimscript. To top it off, I’m pretty sure you have to at least do some Lua work if you want to take advantage of the built in lsp support, which I make use of extensively.

  • bennyp@kbin.social
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    It depends on what your expectations are and how you see your relationship to your editor (sorry for the cringe anthropomorphism)

    If you want to tinker and think of tweaking your editor as a hobby, then sure dive in

    If your config already works and you don’t need the hassle, then don’t

    In between? Want to use a specific lua plugin but don’t want to commit? You can do that too

  • cd_slash_rmrf@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    to add to the other comments: I half-switched a while back, wrote a couple of my files in lua. since you can still source lua files from within vim, so I did that until I switched everything over later. it made it easier to do it that way if you already have a lot of config and don’t want to spend a lot of time up-front to learn it