From 963bae0b9caf4a5c731886d5aa97b509f0f381b9 Mon Sep 17 00:00:00 2001 From: tastytea Date: Mon, 3 Aug 2020 03:13:46 +0200 Subject: [PATCH] Emacs: Enable counsel-projectile everywhere. Previous config was inconsistent. --- init.d/basics/ui.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/init.d/basics/ui.el b/init.d/basics/ui.el index 23ffe11..289907e 100644 --- a/init.d/basics/ui.el +++ b/init.d/basics/ui.el @@ -1,6 +1,6 @@ ;;; ui.el --- Configure user interfaces. -*- lexical-binding: t; -*- -;; Time-stamp: <2020-05-30T19:34:23+0200> +;; Time-stamp: <2020-08-03T03:13:27+0200> ;;; Commentary: ;; * treemacs @@ -89,18 +89,19 @@ (use-package counsel-projectile :demand t :after (projectile) - :custom ((counsel-projectile-mode t) - (projectile-switch-project-action 'my/switch-project)) :config (progn + ;; I'm not exactly sure what I did here but it seems to work. (defun my/counsel-projectile-switch-project-action (project) "Call `my/switch-project'." (let ((projectile-switch-project-action 'my/switch-project)) (counsel-projectile-switch-project-by-name project))) - (counsel-projectile-modify-action 'counsel-projectile-switch-project-action '((add ("Y" my/counsel-projectile-switch-project-action - "open project in treemacs") 1))))) + "open project in treemacs") 1))) + + ;; Overwrite keybindings and so on. + (counsel-projectile-mode))) ;; Shows tabs of all visible buffers per window. (when (>= emacs-major-version 27)