;;; targets/plain.el --- Canned Ivy configuration -*- lexical-binding: t -*-

;; Copyright (C) 2017-2025 Free Software Foundation, Inc.

;; 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/>.

;;; Code:

(require 'counsel)
(require 'targets/elpa)

(ivy-mode)
(counsel-mode)

(setq enable-recursive-minibuffers t)
(setq ivy-use-virtual-buffers t)

(global-set-key (kbd "C-c C-r") #'ivy-resume)
(global-set-key (kbd "C-s") #'swiper)
(global-set-key (kbd "C-c j") #'counsel-git-grep)
(global-set-key (kbd "C-c k") #'counsel-rg)
(global-set-key (kbd "<f2> j") #'counsel-set-variable)
(global-set-key (kbd "C-c s") #'isearch-forward-regexp)

(ivy--elpa-activate)
(condition-case nil
    (require 'ivy-avy)
  (file-error
   (ivy--elpa-install)
   (require 'ivy-avy)))

(provide 'targets/plain)
