-
-
Notifications
You must be signed in to change notification settings - Fork 958
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CocRestart fails #4843
Comments
:CocStart did not show error messages though |
#4850 fixed the The |
same behavior here
|
Hi,
so that if exit code of the process is -1, 143 (SIGTERM) is passed as argument of the on_exit callback, my two cents |
Hi, function! coc#rpc#restart()
if empty(s:client)
call coc#rpc#start_server()
else
call coc#highlight#clear_all()
call coc#ui#sign_unplace()
call coc#float#close_all()
autocmd! coc_dynamic_autocmd
autocmd! coc_dynamic_content
autocmd! coc_dynamic_option
call coc#rpc#request('detach', [])
unlet g:coc_status
let g:coc_service_initialized = 0
sleep 100m
if exists('$COC_NVIM_REMOTE_ADDRESS')
call coc#rpc#close_connection()
sleep 100m
call coc#rpc#start_server()
else
let s:client['command'] = coc#util#job_command()
call coc#client#restart(s:name)
call s:check_vim_enter()
endif
echohl MoreMsg | echom 'starting coc.nvim service' | echohl None
endif
endfunction if server is stoped by closing connections, i.e. the function is modified as follows: function! coc#rpc#restart()
if empty(s:client)
call coc#rpc#start_server()
else
call coc#highlight#clear_all()
call coc#ui#sign_unplace()
call coc#float#close_all()
autocmd! coc_dynamic_autocmd
autocmd! coc_dynamic_content
autocmd! coc_dynamic_option
call coc#rpc#request('detach', [])
unlet g:coc_status
let g:coc_service_initialized = 0
sleep 100m
if 1 "exists('$COC_NVIM_REMOTE_ADDRESS') by doing this connections are closed and server started
call coc#rpc#close_connection()
sleep 100m
call coc#rpc#start_server()
else
let s:client['command'] = coc#util#job_command()
call coc#client#restart(s:name)
call s:check_vim_enter()
endif
echohl MoreMsg | echom 'starting coc.nvim service' | echohl None
endif
endfunction the abnormal exit does not occurr anymore. I also noticed that COC_NVIM_REMOTE_ADDRESS variable is not set, best C. |
😊 |
Result from CocInfo
versions
vim version: VIM - Vi IMproved 9.0 9000749
node version: v18.17.1
coc.nvim version: 0.0.82-d1568d56 2023-09-29 19:43:34 +0800
coc.nvim directory: /home/tester/.vim/plugged/coc.nvim
term: dumb
platform: linux
Log of coc.nvim
Describe the bug
:CocStart shows below
Reproduce the bug
We will close your issue when you don't provide minimal vimrc and we can't
reproduce it
Create file
mini.vim
with:Start (neo)vim with command:
vim -u mini.vim
Operate vim.
same result:
Screenshots (optional)
If applicable, add screenshots to help explain your problem.
The text was updated successfully, but these errors were encountered: