mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 17:40:06 +08:00
Fix lua runner in windows (#2427)
* Fix lua runner in windows * Check lua executable in windows, there are lua lua51 lua52 lua53
This commit is contained in:
parent
e70055a8f9
commit
4311c0afbe
@ -37,7 +37,12 @@ function! SpaceVim#layers#lang#lua#config() abort
|
||||
endif
|
||||
|
||||
call SpaceVim#mapping#space#regesit_lang_mappings('lua', function('s:language_specified_mappings'))
|
||||
call SpaceVim#plugins#runner#reg_runner('lua', 'lua %s')
|
||||
let luaexe = filter(['lua53', 'lua52', 'lua51'], 'executable(v:val)')
|
||||
if !empty(luaexe)
|
||||
call SpaceVim#plugins#runner#reg_runner('lua', luaexe[0] . ' %s')
|
||||
else
|
||||
call SpaceVim#plugins#runner#reg_runner('lua', 'lua %s')
|
||||
endif
|
||||
if !empty(s:lua_repl_command)
|
||||
call SpaceVim#plugins#repl#reg('lua',s:lua_repl_command)
|
||||
else
|
||||
@ -72,5 +77,3 @@ function! s:language_specified_mappings() abort
|
||||
\ 'call SpaceVim#plugins#repl#send("selection")',
|
||||
\ 'send selection and keep code buffer focused', 1)
|
||||
endfunction
|
||||
|
||||
au BufEnter *.lua :LuaOutputMethod buffer
|
||||
|
Loading…
Reference in New Issue
Block a user