vim-plugins icon indicating copy to clipboard operation
vim-plugins copied to clipboard

Add lua support into SpaceVim.

Open wsdjeg opened this issue 8 years ago • 12 comments

@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.

wsdjeg avatar Jan 20 '17 13:01 wsdjeg

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

WolfgangMehner avatar Jan 20 '17 14:01 WolfgangMehner

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

wsdjeg avatar Jan 20 '17 14:01 wsdjeg

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

WolfgangMehner avatar Jan 20 '17 14:01 WolfgangMehner

That would be great. thanks.

wsdjeg avatar Jan 20 '17 14:01 wsdjeg

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.

WolfgangMehner avatar Jan 20 '17 14:01 WolfgangMehner

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.

wsdjeg avatar Jan 20 '17 14:01 wsdjeg

@WolfgangMehner hi, does lua-support has omnifunc for lua? I can not get it work.

wsdjeg avatar Jan 21 '17 12:01 wsdjeg

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.)

WolfgangMehner avatar Jan 21 '17 16:01 WolfgangMehner

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.

wsdjeg avatar Jan 22 '17 00:01 wsdjeg

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.

WolfgangMehner avatar Jan 25 '17 18:01 WolfgangMehner

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.

WolfgangMehner avatar Jan 25 '17 18:01 WolfgangMehner

the lua layer of spavevim should be improved. I will look into the plugins you show me. thanks!

wsdjeg avatar Mar 28 '17 05:03 wsdjeg