1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 02:10:05 +08:00
SpaceVim/bundle/vim-lua/autoload/lua.vim
2021-10-15 22:58:26 +08:00

22 lines
455 B
VimL
Vendored

" source Lua...
if has('lua')
exe 'luafile ' . fnamemodify(expand('<sfile>'), ':h:h').'/lua/luavi/complete.lua'
endif
""
" @public
" this function is the omnifunc for lua file. to enable lua complete, add this
" to you vimrc.
" >
" augroup vim-lua
" autocmd!
" autocmd FileType lua setlocal omnifunc=lua#complete
" augroup END
" <
function! lua#complete(findstart, base) abort
return lua#omni#complete(a:findstart, a:base)
endfunction