1

sysinit.vim works like a charm, but I want to fully transit into lua.

How file should be called? sysinit.lua doesn't work.

2 Answers 2

1

This is not supported, but you can execute lua code inside vimscript.

lua << EOF
  -- your lua code
EOF
1
  • 1
    By my reading of the linked issue, this (or at least, calling a lua file from sysinit.vim) is in fact the recommended way to do this, so saying it's "probably not supported" doesn't seem right to me. +1 anyway for solving the problem. Welcome to the site!
    – Rich
    Aug 7 at 13:53
0

For system wide init in lua you could have a init.lua in {dir}/nvim/init.lua where {dir} is any directory in $XDG_CONFIG_DIRS.

More information with: :help config

2
  • 1
    But $XDG_CONFIG_DIRS is typically $HOME/.config/. So it's not a system wide config file location.
    – gitaarik
    Apr 20 at 12:30
  • Also, I haven't tested this, but the documentation reads to me like if you have a regular user init.lua in $XDG_CONFIG_HOME then any ones in $XDG_CONFIG_DIRS won't be read, so I don't think this will work at all, regardless of the actual locations.
    – Rich
    Aug 7 at 13:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.