From bebe46145d71c67142500580b9b6da1c57364ed9 Mon Sep 17 00:00:00 2001 From: tastytea Date: Fri, 13 Nov 2020 18:02:16 +0100 Subject: [PATCH] Emacs: Use counsel-imenu, remove flimenu. --- init.d/basics/ui.el | 7 ++++--- init.d/programming/common.el | 16 +--------------- init.d/text/common.el | 14 ++++++++++++-- 3 files changed, 17 insertions(+), 20 deletions(-) diff --git a/init.d/basics/ui.el b/init.d/basics/ui.el index d58b08e..2205e70 100644 --- a/init.d/basics/ui.el +++ b/init.d/basics/ui.el @@ -1,6 +1,6 @@ ;;; ui.el --- Configure user interfaces. -*- lexical-binding: t; -*- -;; Time-stamp: <2020-11-13T14:41:37+0100> +;; Time-stamp: <2020-11-13T18:00:51+0100> ;;; Commentary: ;; * treemacs @@ -64,9 +64,10 @@ ;; Extensions for ivy (use-package counsel :demand t - :after (ivy) + :after (ivy imenu) :bind (("C-x C-f" . counsel-find-file) - ("M-x" . counsel-M-x))) + ("M-x" . counsel-M-x) + ("M-i" . counsel-imenu))) ;; More information in ivy mini-buffers. (use-package ivy-rich diff --git a/init.d/programming/common.el b/init.d/programming/common.el index 83b2679..44d0560 100644 --- a/init.d/programming/common.el +++ b/init.d/programming/common.el @@ -1,6 +1,6 @@ ;;; common.el --- Common programming settings. -*- lexical-binding: t; -*- -;; Time-stamp: <2020-11-13T16:29:55+0100> +;; Time-stamp: <2020-11-13T17:58:15+0100> ;;; Commentary: @@ -203,20 +203,6 @@ collapse other projects." (set-face-foreground 'hl-indent-face (face-background 'default))) :hook (prog-mode . hl-indent-mode)) -;; Tries to find points of interest in buffer and jumps to them. -(use-package imenu - :custom (imenu-auto-rescan t) - :bind ("M-i" . imenu)) - -;; Tries to find points of interest in all open buffers and jumps to them. -(use-package imenu-anywhere - :after (imenu ivy) - :bind ("C-M-i" . ivy-imenu-anywhere)) - -;; Flatten imenu list. -(use-package flimenu - :hook (c++-mode . flimenu-mode)) - ;; Jump to definition using grep. (use-package dumb-jump :after (ivy) diff --git a/init.d/text/common.el b/init.d/text/common.el index f0adfa6..040e3f6 100644 --- a/init.d/text/common.el +++ b/init.d/text/common.el @@ -1,6 +1,6 @@ ;;; common.el --- Common settings for text files. -*- lexical-binding: t; -*- -;; Time-stamp: <2020-10-27T09:44:52+0100> +;; Time-stamp: <2020-11-13T17:59:58+0100> ;;; Commentary: @@ -120,7 +120,8 @@ (ispell-change-dictionary "de_DE"))) :bind (("" . my/toggle-flyspell) (:map flyspell-mode-map - ("C-;" . nil))) ; iedit needs C-;. + ("C-;" . nil) ; iedit needs C-;. + ("C-M-i" . nil))) ; imenu-anywhere needs it. :hook ((prog-mode . flyspell-prog-mode) ; Spellcheck comments. (text-mode . flyspell-mode) ; Spellcheck text documents ↓. (LaTeX-mode . my/flyspell-german) @@ -309,5 +310,14 @@ :diminish rainbow-mode :hook (prog-mode . rainbow-mode)) +;; Tries to find points of interest in buffer and jumps to them. +(use-package imenu + :custom (imenu-auto-rescan t)) + +;; Tries to find points of interest in all open buffers and jumps to them. +(use-package imenu-anywhere + :after (imenu ivy) + :bind ("C-M-i" . ivy-imenu-anywhere)) + (provide 'text/common) ;;; common.el ends here