I recently started using lsp in emacs, which uses clangd for its C support. While developing I routinely get a message that
Server clangd:<some number> has exited with status exit. Do you want to restart it? (y or n)
Sometimes it will be able to restart, other times it will fail. Even worse sometimes it will get into a loop where it seems to be trying to restart several clangd servers over and over, which continually fail to restart.
This seems to mostly happen when I open new files in my editor. Often it will occur when opening a new file and when I start to make my first edit.
I’ve checked the output of the lsp, but it doesn’t seem to indicate to me what the issue is. I usually just have to kill lsp, then reinitialize, but that only works for so long.
Let me know how I can go about diagnosing this or any info that would be useful.