all repos — nixfiles @ 573457f40c06a867f9613872ab41b43e61ed81f1

System and user configuration, managed by nix and home-manager

emacs: avoid duplicate project.el entries

Alan Pearce
commit

573457f40c06a867f9613872ab41b43e61ed81f1

parent

83be0be9d001b092bbce4c1b7273a4e6d92b0e3b

1 file changed, 9 insertions(+), 1 deletion(-)

jump to
M user/emacs/init.eluser/emacs/init.el
@@ -997,13 +997,21 @@ (setq treemacs-nerd-icons-tab " "))
:config (progn (treemacs-load-theme "simple"))) +(defun ap/consult-ghq-switch-project (dir) + "Append a slash to avoid project.el remembering two different +paths for the same project." + (interactive) + (project-switch-project (if (string-suffix-p "/" dir) + dir + (concat dir "/")))) (use-package consult-ghq :defer 5 :general (:keymaps 'project-prefix-map "o" #'consult-ghq-switch-project) :config (progn (setq consult-ghq-grep-function #'consult-grep - consult-ghq-find-function #'consult-find))) + consult-ghq-find-function #'consult-find + consult-ghq-switch-project-function #'ap/consult-ghq-switch-project))) (use-package envrc :defer 2