Emacs: Add window-purpose.
This commit is contained in:
parent
3dae6df898
commit
e06337aa8c
|
@ -1,6 +1,6 @@
|
|||
;;; buffers.el --- Default settings for buffers. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Time-stamp: <2019-12-26T07:37:53+00:00>
|
||||
;; Time-stamp: <2020-01-21T02:51:01+0100>
|
||||
|
||||
;;; Commentary:
|
||||
;; * Setup scratch buffer.
|
||||
|
@ -73,5 +73,23 @@
|
|||
(midnight-mode t)
|
||||
)
|
||||
|
||||
(use-package window-purpose
|
||||
:pin melpa ; We need > 1.7 <https://github.com/bmag/emacs-purpose/issues/158>
|
||||
|
||||
:config
|
||||
(purpose-mode)
|
||||
(add-to-list 'purpose-user-mode-purposes '(c++-mode . cpp))
|
||||
(add-to-list 'purpose-user-mode-purposes '(emacs-lisp-mode . elisp))
|
||||
(add-to-list 'purpose-user-mode-purposes '(Man-mode . help-buffers))
|
||||
(purpose-compile-user-configuration)
|
||||
(add-to-list 'purpose-special-action-sequences
|
||||
'(help-buffers
|
||||
purpose-display-reuse-window-buffer))
|
||||
|
||||
;; All Magit buffers have the same purpose.
|
||||
(require 'window-purpose-x)
|
||||
(purpose-x-magit-single-on)
|
||||
)
|
||||
|
||||
(provide 'basics/buffers)
|
||||
;;; buffers.el ends here
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; ui.el --- Configure user interfaces. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Time-stamp: <2020-01-20T19:46:38+0100>
|
||||
;; Time-stamp: <2020-01-21T01:49:08+0100>
|
||||
|
||||
;;; Commentary:
|
||||
;; * treemacs
|
||||
|
@ -147,6 +147,18 @@
|
|||
(:face font-lock-comment-face)))))))
|
||||
)
|
||||
|
||||
(use-package ivy-purpose
|
||||
:after (window-purpose)
|
||||
|
||||
:config
|
||||
(ivy-purpose-setup)
|
||||
|
||||
:bind
|
||||
(:map purpose-mode-map
|
||||
("C-x b" . ivy-purpose-switch-buffer-without-purpose)
|
||||
)
|
||||
)
|
||||
|
||||
;; Switch between named persistent window configurations.
|
||||
(when (>= emacs-major-version 27)
|
||||
(use-package tab-bar
|
||||
|
|
Loading…
Reference in New Issue
Block a user