Skip to content

Commit

Permalink
tweak(ui): make anzu obsolete
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed May 17, 2024
1 parent 3682692 commit db146c6
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 19 deletions.
19 changes: 0 additions & 19 deletions modules/me-ui.el
Original file line number Diff line number Diff line change
Expand Up @@ -94,25 +94,6 @@
evil-delete evil-delete-line evil-delete-whole-line
evil-goto-last-change evil-goto-last-change-reverse)))))

;; From Doom Emacs
(use-package anzu
:straight t
:custom
(anzu-cons-mode-line-p nil) ; We manage our own modeline segments
:config
;; Ensure anzu state is cleared when searches & iedit are done
(add-hook 'iedit-mode-end-hook #'anzu--reset-status)
(advice-add #'evil-force-normal-state :before #'anzu--reset-status)
;; Fix matches segment mirroring across all buffers
(mapc #'make-variable-buffer-local
'(anzu--total-matched anzu--current-position anzu--state anzu--cached-count
anzu--cached-positions anzu--last-command anzu--last-isearch-string anzu--overflow-p)))

(use-package evil-anzu
:straight t
:unless (+package-disabled-p 'evil 'me-evil)
:hook (evil-mode . global-anzu-mode))


(provide 'me-ui)

Expand Down
34 changes: 34 additions & 0 deletions modules/obsolete/me-anzu.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
;;; me-anzu.el --- anzu -*- lexical-binding: t; -*-

;; Copyright (C) 2022-2024 Abdelhak Bougouffa

;; Author: Abdelhak Bougouffa (rot13 "nobhtbhssn@srqbencebwrpg.bet")

;;; Commentary:

;;; Code:


;; From Doom Emacs
(use-package anzu
:straight t
:custom
(anzu-cons-mode-line-p nil) ; We manage our own modeline segments
:config
;; Ensure anzu state is cleared when searches & iedit are done
(add-hook 'iedit-mode-end-hook #'anzu--reset-status)
(advice-add #'evil-force-normal-state :before #'anzu--reset-status)
;; Fix matches segment mirroring across all buffers
(mapc #'make-variable-buffer-local
'(anzu--total-matched anzu--current-position anzu--state anzu--cached-count
anzu--cached-positions anzu--last-command anzu--last-isearch-string anzu--overflow-p)))

(use-package evil-anzu
:straight t
:unless (+package-disabled-p 'evil 'me-evil)
:hook (evil-mode . global-anzu-mode))


(provide 'obsolete/me-anzu)

;;; me-anzu.el ends here

0 comments on commit db146c6

Please sign in to comment.