summaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
authorKjetil Orbekk <kj@orbekk.com>2022-09-29 19:26:49 -0400
committerKjetil Orbekk <kj@orbekk.com>2022-09-29 19:26:49 -0400
commitbeef4109ea3788133d0aad6bc97f2053c4ae37df (patch)
tree52b6fde8e1c7b452c0e99242bf0c780074597216 /emacs
parenta34cfaf308cef774b4c7c9b5c3f3ed63decfc38c (diff)
Add projectile
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.config/emacs-kj/init.el19
1 files changed, 15 insertions, 4 deletions
diff --git a/emacs/.config/emacs-kj/init.el b/emacs/.config/emacs-kj/init.el
index fb29820..d427d43 100644
--- a/emacs/.config/emacs-kj/init.el
+++ b/emacs/.config/emacs-kj/init.el
@@ -49,6 +49,10 @@
(set-fringe-mode 10)
(setq next-screen-context-lines 10)
+;; Prevent pop-up buffers from using new windows.
+(add-to-list 'display-buffer-alist
+ '("\\*\\(Help\\|info\\)\\*)" . #'display-buffer-same-window))
+
(use-package avy
:bind
(("C-c l" . avy-goto-char)
@@ -109,7 +113,7 @@
;; Hide the mode line of the Embark live/completions buffers
(add-to-list 'display-buffer-alist
'("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*"
- nil
+ .
(window-parameters (mode-line-format . none)))))
(use-package embark-consult
@@ -234,10 +238,10 @@
;; Optionally configure a different project root function.
;; There are multiple reasonable alternatives to chose from.
;;;; 1. project.el (the default)
- (setq consult-project-function #'consult--default-project-function)
+ ;;(setq consult-project-function #'consult--default-project-function)
;;;; 2. projectile.el (projectile-project-root)
- ;; (autoload 'projectile-project-root "projectile")
- ;; (setq consult-project-function (lambda (_) (projectile-project-root)))
+ (autoload 'projectile-project-root "projectile")
+ (setq consult-project-function (lambda (_) (projectile-project-root)))
;;;; 3. vc.el (vc-root-dir)
;; (setq consult-project-function (lambda (_) (vc-root-dir)))
;;;; 4. locate-dominating-file
@@ -257,6 +261,13 @@
(use-package magit)
(use-package org)
+(use-package projectile
+ :ensure t
+ :init
+ (projectile-mode +1)
+ :bind (:map projectile-mode-map
+ ("C-c p" . projectile-command-map)))
+
(use-package ediff
:init
(setq ediff-diff-options "-w" ; turn off whitespace checking