diff --git a/init.org b/init.org index e8d8e4d..b3b87bd 100644 --- a/init.org +++ b/init.org @@ -201,33 +201,6 @@ Needs to load early so the ~:general~ keyword is available for ~use-package~. #+RESULTS: -*** Enable Undo Tree -undo-tree is my preferred way of undoing and redoing stuff. The main reason is it doesn’t create a linear undo/redo history, but rather a complete tree you can navigate to see your complete editing history. One of the two obvious things to do are to tell Emacs to save all its undo history fies in a dedicated directory, otherwise we’d risk littering all of our directories. The second thing is to simply globally enable its mode. - -#+BEGIN_SRC emacs-lisp -(use-package undo-tree - :defer t - :straight (:build t) - :custom - (undo-tree-history-directory-alist - `(("." . ,(expand-file-name (file-name-as-directory "undo-tree-hist") - user-emacs-directory)))) - :init - (global-undo-tree-mode) - :config - (setq undo-tree-visualizer-diff t - undo-tree-auto-save-history t - undo-tree-enable-undo-in-region t - undo-limit (* 800 1024) - undo-strong-limit (* 12 1024 1024) - undo-outer-limit (* 128 1024 1024))) - -#+END_SRC - -#+RESULTS: -: [nil 26444 18481 193426 nil elpaca-process-queues nil nil 879000 nil] - - @@ -451,19 +424,6 @@ It provides a minor-mode : [nil 26383 36877 803383 nil elpaca-process-queues nil nil 768000 nil] -** Collect visible URLs to open in browser - -#+BEGIN_SRC emacs-lisp - (use-package fancy-ffap-menu - :ensure (:host "codeberg.org" :repo "kakafarm/emacs-fancy-ffap-menu" - :main "fancy-ffap-menu.el") - :commands (fancy-ffap-menu-list-urls) - ) -#+END_SRC - -#+RESULTS: -: [nil 26432 21940 582674 nil elpaca-process-queues nil nil 547000 nil] - * Editor Features #+BEGIN_SRC emacs-lisp @@ -528,11 +488,26 @@ When undo-tree-mode is active the following bindings are available: - C-x r u : store undo-tree state in the given register - C-x r U : restore undo-tree state from the given register +One of the two obvious things to do are to tell Emacs to save all its undo history fies in a dedicated directory, otherwise we’d risk littering all of our directories. The second thing is to simply globally enable its mode. + #+BEGIN_SRC emacs-lisp (use-package undo-tree + :defer t :ensure t + :custom + (undo-tree-history-directory-alist + `(("." . ,(expand-file-name (file-name-as-directory "undo-tree-hist") + user-emacs-directory)))) :init - (global-undo-tree-mode)) + (global-undo-tree-mode) + :config + (setq undo-tree-visualizer-diff t + undo-tree-auto-save-history t + undo-tree-enable-undo-in-region t + undo-limit (* 800 1024) + undo-strong-limit (* 12 1024 1024) + undo-outer-limit (* 128 1024 1024))) + #+END_SRC #+RESULTS: @@ -1528,33 +1503,27 @@ see also [[https://www.masteringemacs.org/article/how-to-get-started-tree-sitter **** Enable ParEdit in lispy modes #+BEGIN_SRC emacs-lisp - ;; Lisp support - (use-package package-lint-flymake - :ensure t) ;; needed before activating lisp-interaction-mode-hook - (use-package paredit - :ensure nil - :after package-lint-flymake - :commands (enable-paredit-mode) - :init - (dolist (mode '(emacs-lisp-mode-hook - lisp-interaction-mode-hook - lisp-mode-hook - scheme-mode-hook)) - (add-hook mode #'enable-paredit-mode))) - (use-package evil-paredit - :ensure t - :commands (evil-paredit-mode) - :init - (dolist (mode '(emacs-lisp-mode-hook - lisp-interaction-mode-hook - lisp-mode-hook - scheme-mode-hook)) - (add-hook mode #'evil-paredit-mode))) - + ;; Lisp support + (use-package package-lint-flymake + :ensure t) ;; needed before activating lisp-interaction-mode-hook + (use-package paredit + :ensure nil + :after package-lint-flymake + :commands (enable-paredit-mode) + :init + (dolist (mode '(emacs-lisp-mode-hook + lisp-interaction-mode-hook + lisp-mode-hook + scheme-mode-hook)) + (add-hook mode #'enable-paredit-mode))) + (use-package enhanced-evil-paredit + :ensure (enhanced-evil-paredit :host github :repo "jamescherti/enhanced-evil-paredit.el" :wait t) + :config + (add-hook 'paredit-mode-hook #'enhanced-evil-paredit-mode)) #+END_SRC #+RESULTS: -***** TODO FIx paredit bug related to obsolete macro +***** TODO Fix paredit bug related to obsolete macro evil-paredit relies on an obsolete (and no longer available method) `evil-called-interactively-p`. So I define it here till evil-paredit