Remove ivy/counsel

This commit is contained in:
Andreas Zweili 2024-05-20 11:16:16 +02:00
parent 2722bacc19
commit 78d981b858
7 changed files with 1 additions and 78 deletions

View File

@ -1,41 +0,0 @@
;;; counsel-git-grep-current-mode.el --- wrapper arround counsel-git-grep -*- lexical-binding: t; -*-
;; Copyright (C) 2020 Jürgen Hötzel
;; Author: Jürgen Hötzel <juergen@hoetzel.info>
;; URL: https://github.com/juergenhoetzel/counsel-git-grep-current-mode
;; Package-Requires: ((emacs "25.1") (counsel "0.13.0"))
;; Keywords: convenience, matching, tools
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;; Like `counsel-git-grep', but limit search to current file extension."
;;; Code:
(require 'counsel)
;;;###autoload
(defun counsel-git-grep-current-mode ()
"Like `counsel-git-grep', but limit to current file extension."
(interactive)
(pcase-let ((`(_ . ,cmd) (counsel--git-grep-cmd-and-proj nil))
(ext (file-name-extension (buffer-file-name))))
(counsel-git-grep nil nil (format "%s -- '*.%s'" cmd (shell-quote-argument ext)))))
(provide 'counsel-git-grep-current-mode)
(global-set-key (kbd "C-c k") 'counsel-git-grep-current-mode)
;;; test.el ends here

View File

@ -1,25 +0,0 @@
;; -*- lexical-binding: t; -*-
(use-package counsel
:config
(ivy-mode 1)
(counsel-mode 1)
(setq ivy-use-virtual-buffers t)
(setq ivy-count-format "(%d/%d) ")
(setq ivy-initial-inputs-alist nil)
(with-eval-after-load 'org
(define-key org-mode-map (kbd "C-c C-q") #'counsel-org-tag))
(global-set-key (kbd "C-c v") 'ivy-push-view)
(global-set-key (kbd "C-c V") 'ivy-pop-view)
;; (global-set-key (kbd "C-s") 'swiper-isearch)
(evil-define-key 'normal 'global "/" 'swiper-isearch)
(global-set-key (kbd "C-c j") 'counsel-git-grep)
(define-key ivy-minibuffer-map (kbd "S-SPC") (lambda () (interactive) (insert " ")))
(global-set-key (kbd "C-c C-r") 'ivy-resume))
;; stil to be tested, I currently don't have a real use case
(use-package counsel-tramp
:config
(add-hook 'counsel-tramp-pre-command-hook '(lambda ()
(projectile-mode 0)))
(add-hook 'counsel-tramp-quit-hook '(lambda ()
(projectile-mode 1))))

View File

@ -6,7 +6,7 @@
Buffers :
"
("n" next-buffer "next")
;;("b" ivy-switch-buffer "switch")
("b" consult-buffer "switch")
("B" ibuffer "ibuffer")
("p" previous-buffer "prev")
("C-b" buffer-menu "buffer menu")

View File

@ -32,7 +32,6 @@
(require 'mu4e)
;;setq mu4e-completing-read-function (quote ivy-completing-read))
(setq mail-user-agent 'mu4e-user-agent)
(setq mu4e-drafts-folder "/personal/Drafts")

View File

@ -54,14 +54,6 @@
(sort file-list
#'(lambda (x y) (time-less-p (nth 6 y) (nth 6 x))))))
;; use ivy to select start-file
;; (setq start-file (ivy-read
;; (concat "Move selected file to " target-dir ":")
;; file-list-sorted
;; :re-builder #'ivy--regex
;; :sort nil
;; :initial-input nil))
;; add full path to start file and end-file
(setq start-file-full
(expand-file-name start-file bjm/conference-image-dir))

View File

@ -3,7 +3,6 @@
:after consult
:bind
(("C-x C-b" . persp-ibuffer) ; or use a nicer switcher, see below
;;("C-x b" . persp-ivy-switch-buffer)
("C-x k" . persp-kill-buffer*))
:custom
(persp-mode-prefix-key (kbd "C-x x")) ; pick your own prefix key here

View File

@ -8,7 +8,6 @@
(setq projectile-project-search-path '(("~/.nixos" . 1)
"~/git_repos/projects/"
"~/git_repos/work/")
;;projectile-completion-system 'ivy
projectile-git-fd-args "-H -0 -E .git -tf --strip-cwd-prefix -c never"
projectile-completion-system 'default
projectile-switch-project-action #'projectile-dired)