1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-24 18:52:22 +08:00

43 lines
1.0 KiB
VimL
Raw Normal View History

2017-10-04 10:02:38 +08:00
"=============================================================================
" server.vim --- server manager for SpaceVim
" Copyright (c) 2016-2017 Shidong Wang & Contributors
" Author: Shidong Wang < wsdjeg at 163.com >
" URL: https://spacevim.org
" License: MIT license
"=============================================================================
2017-10-04 13:49:14 +08:00
2017-10-04 10:02:38 +08:00
function! SpaceVim#server#connect()
if empty($SPACEVIM_SERVER_ADDRESS)
2017-11-08 21:14:40 +08:00
let $SPACEVIM_SERVER_ADDRESS = fnamemodify('~/.cache/SpaceVim/server', ':p')
2017-10-04 10:02:38 +08:00
endif
2017-11-08 21:14:40 +08:00
try
call serverstart($SPACEVIM_SERVER_ADDRESS)
call SpaceVim#logger#info('SpaceVim server startup at:' . $SPACEVIM_SERVER_ADDRESS)
catch /Failed to start server: address already in use/
endtry
2017-10-04 10:02:38 +08:00
endfunction
2017-10-04 13:49:14 +08:00
function! SpaceVim#server#export_server()
call system('export $TEST_SPACEVIM="test"')
endfunction
function! SpaceVim#server#terminate()
endfunction
function! SpaceVim#server#list()
if has('nvim')
return join(serverlist(), "\n")
else
endif
endfunction
2017-10-04 10:02:38 +08:00