Add lua support into SpaceVim.
@WolfgangMehner
Hello, I am wsdjeg, and I am author of SpaceVim, and the website is https://spacevim.org, SpaceVim is just something like spacemacs, but for vim, a user open an issue in my repo ask for lua support. I just find your vim-plugins. I want to use your plugins as lang#lua layer, what do you think? BTW, I hope you could join us.
wsdjeg
thanks.
Sure, you can use it. Do you require anything from me for that? (For the rest of this month I will not have a lot of time, sorry.)
There is a standalone version of the Lua Support here: https://github.com/WolfgangMehner/lua-support The latest published version is marked by this tag: https://github.com/WolfgangMehner/lua-support/releases/tag/version-1.0
I am not sure lua support has any mappings override SpaceVim, I need read the code. and thanks for you help.
https://github.com/SpaceVim/SpaceVim/pull/138
All hardcoded maps start with a mapleader configurable via g:Lua_Mapleader (default is \):
https://github.com/WolfgangMehner/lua-support/blob/master/doc/luasupport.txt#L787
There are some additional maps in ftplugin/lua.vim, which are easy to remove:
https://github.com/WolfgangMehner/lua-support/blob/master/ftplugin/lua.vim#L41
That would be great. thanks.
Btw., my plug-in contains the reference manuals for Lua, similar to https://github.com/wsdjeg/luarefvim .
(compare https://github.com/SpaceVim/SpaceVim/blob/lang/lua/autoload/SpaceVim/layers/lang/lua.vim#L7 )
However I provide the versions 5.1, 5.2, and 5.3. You can jump to the documentation from inside Lua buffers with the maps \h1 \h2 and \h3, depending on which version you want.
Nice, I will have look, I just fix the duplicate tags error of wsdjeg/luarefvim, but it is not good idea, I will have a look at your plugin.
@WolfgangMehner hi, does lua-support has omnifunc for lua? I can not get it work.
No, it does not. I think there are one or two solutions out there.
(To be honest, I am not that interested in omni-completion, I mostly use &path and &include.)
if you just use path and include, how do you complete code?
some people ask me for lua omni-completion support, I just search in google, and find two project, but all of the has not been update for more than three years.
some people ask me for lua omni-completion support, I just search in google, and find two project, but all of the has not been update for more than three years.
This is not necessarily a problem, as long as the omni-completion support has been updated for Lua 5.2 it is still good, since Lua 5.3 did not change any parts of the language that would break the completion.
Add at least for https://github.com/xolox/vim-lua-ftplugin the author is still very active on GitHub, so one might still get some support.
if you just use path and include, how do you complete code?
The path, include, and includeexpr settings are not for completing code, but for searching through the include-tree of a source file. This then works with <ctrl-p>, [I, <ctrl-w>i, ... It even extends gf.
For a scripting language this is already a huge help, since you can jump to the definition of functions, class, variables and so on. And <ctrl-p> let you complete the keywords which are defined there. I find this suffices for my work-flow.
the lua layer of spavevim should be improved. I will look into the plugins you show me. thanks!