From d85c7b857bc536e2371d7dfe72f05d6d3b095f0a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 14 Oct 2020 21:39:56 -0400 Subject: [PATCH] lang/cc: fix sem-highlight disabler We unset ccls-sem-highlight-method buffer-locally, but lsp-before-initialize-hook only runs once per new LSP server instance, and each server could preside over any number of buffers, so only the first buffer is affected. --- modules/lang/cc/config.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/lang/cc/config.el b/modules/lang/cc/config.el index d73ae4380..c928c1680 100644 --- a/modules/lang/cc/config.el +++ b/modules/lang/cc/config.el @@ -285,8 +285,9 @@ If rtags or rdm aren't available, fail silently instead of throwing a breaking e (set-evil-initial-state! 'ccls-tree-mode 'emacs) ;; Disable `ccls-sem-highlight-method' if `lsp-enable-semantic-highlighting' ;; is nil. Otherwise, it appears ccls bypasses it. - (setq-hook! 'lsp-before-initialize-hook - ccls-sem-highlight-method (if lsp-enable-semantic-highlighting ccls-sem-highlight-method)) + (setq-hook! 'lsp-configure-hook + ccls-sem-highlight-method (if lsp-enable-semantic-highlighting + ccls-sem-highlight-method)) (when (or IS-MAC IS-LINUX) (let ((cpu-count-command (cond (IS-MAC '("sysctl" "-n" "hw.ncpu")) (IS-LINUX '("nproc"))