New emacs/ediff module
Ediff config was moved out of core. Also includes evil compatibility (mvoed out of feature/evil) & wconf save/restore.
This commit is contained in:
parent
e2d055a40b
commit
bdee28609a
5 changed files with 31 additions and 9 deletions
|
@ -45,11 +45,6 @@ successfully sets indent_style/indent_size.")
|
||||||
truncate-lines t
|
truncate-lines t
|
||||||
truncate-partial-width-windows 50)
|
truncate-partial-width-windows 50)
|
||||||
|
|
||||||
;; ediff
|
|
||||||
(setq ediff-diff-options "-w"
|
|
||||||
ediff-split-window-function #'split-window-horizontally
|
|
||||||
ediff-window-setup-function #'ediff-setup-windows-plain)
|
|
||||||
|
|
||||||
(defun doom|check-large-file ()
|
(defun doom|check-large-file ()
|
||||||
"Check if the buffer's file is large (see `doom-large-file-size'). If so, ask
|
"Check if the buffer's file is large (see `doom-large-file-size'). If so, ask
|
||||||
for confirmation to open it literally (read-only, disabled undo and in
|
for confirmation to open it literally (read-only, disabled undo and in
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
|
|
||||||
:emacs
|
:emacs
|
||||||
dired ; making dired pretty [functional]
|
dired ; making dired pretty [functional]
|
||||||
|
ediff ; comparing files in Emacs
|
||||||
electric-indent ; smarter, keyword-based electric-indent
|
electric-indent ; smarter, keyword-based electric-indent
|
||||||
eshell ; a consistent, cross-platform shell (WIP)
|
eshell ; a consistent, cross-platform shell (WIP)
|
||||||
imenu ; an imenu sidebar and searchable code index
|
imenu ; an imenu sidebar and searchable code index
|
||||||
|
|
25
modules/emacs/ediff/config.el
Normal file
25
modules/emacs/ediff/config.el
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
;;; emacs/ediff/config.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;; `ediff'
|
||||||
|
(setq ediff-diff-options "-w" ; turn off whitespace checking
|
||||||
|
ediff-split-window-function #'split-window-horizontally
|
||||||
|
ediff-window-setup-function #'ediff-setup-windows-plain)
|
||||||
|
|
||||||
|
;; Restore window config after quitting ediff
|
||||||
|
(defvar +ediff--saved-wconf nil)
|
||||||
|
|
||||||
|
(defun +ediff|save-wconf ()
|
||||||
|
(setq +ediff--saved-wconf (current-window-configuration)))
|
||||||
|
(defun +ediff|restore-wconf ()
|
||||||
|
(set-window-configuration +ediff--saved-wconf))
|
||||||
|
(add-hook 'ediff-before-setup-hook #'+ediff|save-wconf)
|
||||||
|
(add-hook! '(ediff-quit-hook ediff-suspend-hook) #'+ediff|restore-wconf 'append)
|
||||||
|
|
||||||
|
|
||||||
|
;;
|
||||||
|
;; Plugins
|
||||||
|
;;
|
||||||
|
|
||||||
|
(def-package! evil-ediff
|
||||||
|
:when (featurep! :feature evil)
|
||||||
|
:after ediff)
|
5
modules/emacs/ediff/packages.el
Normal file
5
modules/emacs/ediff/packages.el
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
;; -*- no-byte-compile: t; -*-
|
||||||
|
;;; emacs/ediff/packages.el
|
||||||
|
|
||||||
|
(when (featurep! :feature evil)
|
||||||
|
(package! evil-ediff))
|
|
@ -155,10 +155,6 @@
|
||||||
:commands (evilem-create evilem-default-keybindings))
|
:commands (evilem-create evilem-default-keybindings))
|
||||||
|
|
||||||
|
|
||||||
(def-package! evil-ediff
|
|
||||||
:after ediff)
|
|
||||||
|
|
||||||
|
|
||||||
(def-package! evil-embrace
|
(def-package! evil-embrace
|
||||||
:after evil-surround
|
:after evil-surround
|
||||||
:commands (embrace-add-pair embrace-add-pair-regexp)
|
:commands (embrace-add-pair embrace-add-pair-regexp)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue