diff --git a/autoload/nvim_ghost/helper.vim b/autoload/nvim_ghost/helper.vim index ecf46f9..7fcd1c2 100644 --- a/autoload/nvim_ghost/helper.vim +++ b/autoload/nvim_ghost/helper.vim @@ -80,18 +80,16 @@ function! s:send_GET_request(url) abort "{{{1 endfunction function! nvim_ghost#helper#start_server() abort " {{{1 - if has('win32') + if g:nvim_ghost_use_script + call jobstart( + \[g:nvim_ghost_python_executable, g:nvim_ghost_script_path], + \s:joblog_arguments_nokill + \) + elseif has('win32') call jobstart(['cscript.exe', \g:nvim_ghost_scripts_dir . 'start_server.vbs']) else - if g:nvim_ghost_use_script - call jobstart( - \[g:nvim_ghost_python_executable, g:nvim_ghost_script_path], - \s:joblog_arguments_nokill - \) - else call jobstart([g:nvim_ghost_binary_path], s:joblog_arguments_nokill) - endif endif endfunction diff --git a/plugin/nvim_ghost.vim b/plugin/nvim_ghost.vim index dd88f9c..94bfe2d 100644 --- a/plugin/nvim_ghost.vim +++ b/plugin/nvim_ghost.vim @@ -33,13 +33,6 @@ let $GHOSTTEXT_SERVER_PORT = g:nvim_ghost_server_port " Abort if script_mode is enabled but infeasible if g:nvim_ghost_use_script - if has('win32') - echohl WarningMsg - echom 'Sorry, g:nvim_ghost_use_script is currently not available on - \ Windows. Please remove it from your init.vim to use nvim-ghost.' - echohl None - finish - endif if !exists('g:nvim_ghost_python_executable') echohl WarningMsg echom 'Please set g:nvim_ghost_python_executable