From cfebed96db75fc9f681c9839fd6c738fbd09c2f4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 2 Aug 2018 03:47:29 +0200 Subject: [PATCH] lang/cc: cull unnecessary def-package! blocks rtags loads these packages for us, so long as rtags-display-result-backend is properly set. --- modules/lang/cc/config.el | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/modules/lang/cc/config.el b/modules/lang/cc/config.el index 7c492a6be..24a1871a5 100644 --- a/modules/lang/cc/config.el +++ b/modules/lang/cc/config.el @@ -220,6 +220,10 @@ compilation database is present in the project.") (setq rtags-autostart-diagnostics t rtags-use-bookmarks nil rtags-completions-enabled nil + rtags-display-result-backend + (cond ((featurep! :completion ivy) 'ivy) + ((featurep! :completion helm) 'helm) + ('default)) ;; If not using ivy or helm to view results, use a pop-up window rather ;; than displaying it in the current window... rtags-results-buffer-other-window t @@ -238,12 +242,4 @@ compilation database is present in the project.") (when (featurep 'evil) (add-hook 'rtags-jump-hook #'evil-set-jump)) - (add-hook 'rtags-after-find-file-hook #'recenter) - - (def-package! ivy-rtags - :when (featurep! :completion ivy) - :config (setq rtags-display-result-backend 'ivy)) - - (def-package! helm-rtags - :when (featurep! :completion helm) - :config (setq rtags-display-result-backend 'helm))) + (add-hook 'rtags-after-find-file-hook #'recenter))