From 6e764ade2bce7bbcc4febfeac7a68b0c2820dd1e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 13 Aug 2020 15:06:29 -0400 Subject: [PATCH] Add LSP/eglot support to +cc/reload-compile-db --- modules/lang/cc/autoload.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/lang/cc/autoload.el b/modules/lang/cc/autoload.el index fb2362f02..e36824136 100644 --- a/modules/lang/cc/autoload.el +++ b/modules/lang/cc/autoload.el @@ -108,7 +108,12 @@ simpler." (rtags-call-rc :silent t "-J" (or (doom-project-root) default-directory)))) ;; then irony (when (and (featurep 'irony) irony-mode) - (+cc-init-irony-compile-options-h))) + (+cc-init-irony-compile-options-h)) + ;; Otherwise, LSP + (when (bound-and-true-p lsp-mode) + (lsp-workspace-restart)) + (when (bound-and-true-p eglot-managed-mode) + (eglot-reconnect))) ;;;###autoload (defun +cc/imenu ()