Fix #2789: wrong init hooks for irony & rtags

This commit is contained in:
Henrik Lissner 2020-03-29 01:29:27 -04:00
parent 064603f6e6
commit 5033215150
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -40,7 +40,7 @@ This is ignored by ccls.")
;; set up before the likes of irony/lsp are initialized. Also, we use ;; set up before the likes of irony/lsp are initialized. Also, we use
;; local-vars hooks to ensure these only run in their respective major modes, ;; local-vars hooks to ensure these only run in their respective major modes,
;; and not their derived modes. ;; and not their derived modes.
:hook ((after-c-mode after-c++-mode after-objc-mode) . +cc-init-ffap-integration-h) :hook ((c-mode-local-vars c++-mode-local-vars objc-mode-local-vars) . +cc-init-ffap-integration-h)
;;; Improve fontification in C/C++ (also see `modern-cpp-font-lock') ;;; Improve fontification in C/C++ (also see `modern-cpp-font-lock')
:hook (c-mode-common . rainbow-delimiters-mode) :hook (c-mode-common . rainbow-delimiters-mode)
:hook ((c-mode c++-mode) . +cc-fontify-constants-h) :hook ((c-mode c++-mode) . +cc-fontify-constants-h)
@ -120,7 +120,7 @@ This is ignored by ccls.")
:hook (irony-mode . +cc-init-irony-compile-options-h) :hook (irony-mode . +cc-init-irony-compile-options-h)
;; Only initialize `irony-mode' if the server is available. Otherwise fail ;; Only initialize `irony-mode' if the server is available. Otherwise fail
;; quietly and gracefully. ;; quietly and gracefully.
:hook ((after-c-mode after-c++-mode after-objc-mode) . +cc-init-irony-mode-maybe-h) :hook ((c-mode-local-vars c++-mode-local-vars objc-mode-local-vars) . +cc-init-irony-mode-maybe-h)
:preface (setq irony-server-install-prefix (concat doom-etc-dir "irony-server/")) :preface (setq irony-server-install-prefix (concat doom-etc-dir "irony-server/"))
:config :config
(defun +cc-init-irony-mode-maybe-h () (defun +cc-init-irony-mode-maybe-h ()
@ -171,7 +171,7 @@ This is ignored by ccls.")
(use-package! rtags (use-package! rtags
:unless (featurep! +lsp) :unless (featurep! +lsp)
;; Only initialize rtags-mode if rtags and rdm are available. ;; Only initialize rtags-mode if rtags and rdm are available.
:hook ((after-c-mode after-c++-mode after-objc-mode) . +cc-init-rtags-maybe-h) :hook ((c-mode-local-vars c++-mode-local-vars objc-mode-local-vars) . +cc-init-rtags-maybe-h)
:preface (setq rtags-install-path (concat doom-etc-dir "rtags/")) :preface (setq rtags-install-path (concat doom-etc-dir "rtags/"))
:config :config
(defun +cc-init-rtags-maybe-h () (defun +cc-init-rtags-maybe-h ()