Move counsel+helpful integration to ivy module

This commit is contained in:
Henrik Lissner 2018-08-17 03:37:07 +02:00
parent 4a4b012b5d
commit 7a578eb242
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 9 additions and 13 deletions

View file

@ -262,7 +262,7 @@ savehist file."
command-log-mode-open-log-turns-on-mode t command-log-mode-open-log-turns-on-mode t
command-log-mode-is-global t) command-log-mode-is-global t)
;; `expand-region'
(def-package! expand-region (def-package! expand-region
:commands (er/contract-region er/mark-symbol er/mark-word) :commands (er/contract-region er/mark-symbol er/mark-word)
:config :config
@ -273,18 +273,12 @@ savehist file."
(advice-add #'evil-escape :before #'doom*quit-expand-region) (advice-add #'evil-escape :before #'doom*quit-expand-region)
(advice-add #'doom/escape :before #'doom*quit-expand-region)) (advice-add #'doom/escape :before #'doom*quit-expand-region))
;; A better *help* buffer ;; `helpful' --- a better *help* buffer
(def-package! helpful (define-key! 'global
:defer t [remap describe-function] #'helpful-callable
:init [remap describe-command] #'helpful-command
(setq counsel-describe-function-function #'helpful-callable [remap describe-variable] #'helpful-variable
counsel-describe-variable-function #'helpful-variable) [remap describe-key] #'helpful-key)
(define-key! 'global
[remap describe-function] #'helpful-callable
[remap describe-command] #'helpful-command
[remap describe-variable] #'helpful-variable
[remap describe-key] #'helpful-key))
(provide 'core-editor) (provide 'core-editor)
;;; core-editor.el ends here ;;; core-editor.el ends here

View file

@ -103,6 +103,8 @@ immediately runs it on the current candidate (ending the ivy session)."
(set-popup-rule! "^\\*ivy-occur" :size 0.35 :ttl 0 :quit nil) (set-popup-rule! "^\\*ivy-occur" :size 0.35 :ttl 0 :quit nil)
(setq counsel-find-file-ignore-regexp "\\(?:^[#.]\\)\\|\\(?:[#~]$\\)\\|\\(?:^Icon?\\)" (setq counsel-find-file-ignore-regexp "\\(?:^[#.]\\)\\|\\(?:[#~]$\\)\\|\\(?:^Icon?\\)"
counsel-describe-function-function #'helpful-callable
counsel-describe-variable-function #'helpful-variable
;; Add smart-casing and compressed archive searching (-zS) to default ;; Add smart-casing and compressed archive searching (-zS) to default
;; command arguments: ;; command arguments:
counsel-rg-base-command "rg -zS --no-heading --line-number --color never %s ." counsel-rg-base-command "rg -zS --no-heading --line-number --color never %s ."