cquery-project / emacs-cquery

Emacs client for cquery, a low-latency language server supporting multi-million line C++ code-bases
116 stars 14 forks source link

Restart cquery after crash #15

Closed clearmisp closed 6 years ago

clearmisp commented 6 years ago

How do I restart lsp-cquery after a crash? I sometimes see the following errors in Emacs;

/home/micke/devel/projects/LCC/: lsp-cquery has exited (segmentation fault (core dumped)
)
error in process sentinel: lsp--uninitialize-workspace: Process lsp-cquery is not active
error in process sentinel: Process lsp-cquery is not active
lsp--send-wait: Timed out while waiting for a response from the language server
Error in ‘lsp--on-hover’: (error "Process lsp-cquery not running") [3 times]
Error running timer ‘lsp-ui-sideline--run’: (error "Process lsp-cquery not running")

The only way to get cquery up and running again that I know of is to restart Emacs. Is there another way to restart cquery without leaving the Emacs session?

MaskRay commented 6 years ago

I C-x C-b and delete all buffers associated with a lsp-mode workspace.

myrgy commented 6 years ago

is it possible to add some command that will start cquery if it's not running?

UPD: restart issue from lsp-mode https://github.com/emacs-lsp/lsp-mode/issues/285

MaskRay commented 6 years ago

Thanks for reporting this. I think this has been implemented by lsp-mode in https://github.com/emacs-lsp/lsp-mode/pull/290/files

Probably M-x lsp-restart-workspace in case the server dies.