Helm/Eshell/Geiser/SLY/SLIME: Move configs to their respective files.
parent
6b765a9867
commit
4091831038
|
@ -203,6 +203,14 @@
|
|||
;; (setq epa-file-encrypt-to "mail@ambrevar.xyz"))
|
||||
;; (add-hook 'eshell-mode-hook 'ambrevar/fix-local-epa-file-encrypt-to)
|
||||
|
||||
(when (require 'helm nil :noerror)
|
||||
(defun ambrevar/helm/eshell-set-keys ()
|
||||
(define-key eshell-mode-map [remap eshell-pcomplete] 'helm-esh-pcomplete)
|
||||
(define-key eshell-mode-map (kbd "M-p") 'helm-eshell-history)
|
||||
(define-key eshell-mode-map (kbd "M-s") nil) ; Useless when we have 'helm-eshell-history.
|
||||
(define-key eshell-mode-map (kbd "M-s f") 'helm-eshell-prompts-all))
|
||||
(add-hook 'eshell-mode-hook 'ambrevar/helm/eshell-set-keys))
|
||||
|
||||
;;; Auto-suggestion
|
||||
(when (require 'esh-autosuggest nil t)
|
||||
(setq esh-autosuggest-delay 0.75)
|
||||
|
|
|
@ -140,50 +140,12 @@
|
|||
helm-source-bookmark-set
|
||||
helm-source-buffer-not-found))
|
||||
|
||||
;;; Eshell
|
||||
(defun ambrevar/helm/eshell-set-keys ()
|
||||
(define-key eshell-mode-map [remap eshell-pcomplete] 'helm-esh-pcomplete)
|
||||
(define-key eshell-mode-map (kbd "M-p") 'helm-eshell-history)
|
||||
(define-key eshell-mode-map (kbd "M-s") nil) ; Useless when we have 'helm-eshell-history.
|
||||
(define-key eshell-mode-map (kbd "M-s f") 'helm-eshell-prompts-all))
|
||||
(add-hook 'eshell-mode-hook 'ambrevar/helm/eshell-set-keys)
|
||||
|
||||
;;; Comint
|
||||
(defun ambrevar/helm/comint-set-keys ()
|
||||
(define-key comint-mode-map (kbd "M-s f") 'helm-comint-prompts-all)
|
||||
(define-key comint-mode-map (kbd "M-p") 'helm-comint-input-ring))
|
||||
(add-hook 'comint-mode-hook 'ambrevar/helm/comint-set-keys)
|
||||
|
||||
;;; Geiser
|
||||
(with-eval-after-load 'geiser-repl
|
||||
(defun ambrevar/helm/geiser-set-keys ()
|
||||
(define-key geiser-repl-mode-map (kbd "M-p") 'helm-comint-input-ring))
|
||||
(add-hook 'geiser-repl-mode-hook 'ambrevar/helm/geiser-set-keys))
|
||||
|
||||
;;; SLY
|
||||
(with-eval-after-load 'sly
|
||||
(with-eval-after-load 'sly-mrepl
|
||||
(define-key sly-mrepl-mode-map (kbd "M-p") 'helm-comint-input-ring)
|
||||
(define-key sly-mrepl-mode-map (kbd "M-s f") 'helm-comint-prompts-all)
|
||||
(define-key sly-autodoc-mode-map (kbd "C-c C-d C-a") 'helm-sly-apropos)
|
||||
(define-key sly-mrepl-mode-map (kbd "C-c C-x c") 'helm-sly-list-connections)))
|
||||
|
||||
;;; SLIME
|
||||
(with-eval-after-load 'slime
|
||||
(when (require 'helm-slime nil t)
|
||||
(with-eval-after-load 'slime-repl
|
||||
(defun ambrevar/helm/slime-set-keys ()
|
||||
(define-key slime-repl-mode-map (kbd "M-p") 'helm-slime-repl-history)
|
||||
(define-key slime-repl-mode-map (kbd "M-s") nil)
|
||||
(define-key slime-repl-mode-map (kbd "M-s f") 'helm-comint-prompts-all)
|
||||
(define-key slime-autodoc-mode-map (kbd "C-c C-d C-a") 'helm-slime-apropos)
|
||||
(define-key slime-repl-mode-map (kbd "C-c C-x c") 'helm-slime-list-connections)
|
||||
;; REVIEW: Seems that helm-company is less useful than helm-slime-complete.
|
||||
(define-key slime-mode-map (kbd "M-<tab>") 'helm-slime-complete)
|
||||
(dolist (key '("M-<tab>" "<tab>"))
|
||||
(define-key slime-repl-mode-map (kbd key) 'helm-slime-complete)))
|
||||
(add-hook 'slime-repl-mode-hook 'ambrevar/helm/slime-set-keys))))
|
||||
|
||||
;;; TODO: Use helm-ff history in helm file completion.
|
||||
;;; https://github.com/emacs-helm/helm/issues/1118
|
||||
;; (define-key helm-read-file-map (kbd "M-p") 'helm-ff-run-switch-to-history)
|
||||
|
|
|
@ -21,6 +21,12 @@
|
|||
:override 'al/scheme-indent-function)
|
||||
(add-hook 'scheme-mode-hook 'al/scheme-fix-docstring-font-lock)))
|
||||
|
||||
(with-eval-after-load 'geiser-repl
|
||||
(when (require 'helm nil :noerror)
|
||||
(defun ambrevar/helm/geiser-set-keys ()
|
||||
(define-key geiser-repl-mode-map (kbd "M-p") 'helm-comint-input-ring))
|
||||
(add-hook 'geiser-repl-mode-hook 'ambrevar/helm/geiser-set-keys)))
|
||||
|
||||
(when (require 'geiser-impl nil 'noerror)
|
||||
;; (setq geiser-repl-skip-version-check-p t
|
||||
;; geiser-mode-start-repl-p t)
|
||||
|
|
|
@ -37,7 +37,19 @@
|
|||
(add-hook 'slime-repl-mode-hook #'ambrevar/slime-rainbow-init))
|
||||
|
||||
(when (require 'helm-slime nil :noerror)
|
||||
(global-helm-slime-mode)
|
||||
(add-to-list 'helm-source-names-using-follow "SLIME xrefs"))
|
||||
(with-eval-after-load 'slime-repl
|
||||
(defun ambrevar/helm/slime-set-keys ()
|
||||
(define-key slime-repl-mode-map (kbd "M-p") 'helm-slime-repl-history)
|
||||
(define-key slime-repl-mode-map (kbd "M-s") nil)
|
||||
(define-key slime-repl-mode-map (kbd "M-s f") 'helm-comint-prompts-all)
|
||||
(define-key slime-autodoc-mode-map (kbd "C-c C-d C-a") 'helm-slime-apropos)
|
||||
(define-key slime-repl-mode-map (kbd "C-c C-x c") 'helm-slime-list-connections)
|
||||
;; REVIEW: Seems that helm-company is less useful than helm-slime-complete.
|
||||
(define-key slime-mode-map (kbd "M-<tab>") 'helm-slime-complete)
|
||||
(dolist (key '("M-<tab>" "<tab>"))
|
||||
(define-key slime-repl-mode-map (kbd key) 'helm-slime-complete)))
|
||||
(add-hook 'slime-repl-mode-hook 'ambrevar/helm/slime-set-keys))
|
||||
(global-helm-slime-mode)
|
||||
(add-to-list 'helm-source-names-using-follow "SLIME xrefs"))
|
||||
|
||||
(provide 'init-slime)
|
||||
|
|
|
@ -47,10 +47,16 @@
|
|||
|
||||
(setq sly-connection-update-interval 0.1)
|
||||
|
||||
(with-eval-after-load 'sly
|
||||
(when (require 'helm-sly nil :noerror)
|
||||
(global-helm-sly-mode)
|
||||
(add-to-list 'helm-source-names-using-follow "Lisp xrefs")))
|
||||
(when (require 'helm nil :noerror)
|
||||
(with-eval-after-load 'sly-mrepl
|
||||
(define-key sly-mrepl-mode-map (kbd "M-p") 'helm-comint-input-ring)
|
||||
(define-key sly-mrepl-mode-map (kbd "M-s f") 'helm-comint-prompts-all)
|
||||
(define-key sly-autodoc-mode-map (kbd "C-c C-d C-a") 'helm-sly-apropos)
|
||||
(define-key sly-mrepl-mode-map (kbd "C-c C-x c") 'helm-sly-list-connections)))
|
||||
|
||||
(when (require 'helm-sly nil :noerror)
|
||||
(global-helm-sly-mode)
|
||||
(add-to-list 'helm-source-names-using-follow "Lisp xrefs"))
|
||||
|
||||
(with-eval-after-load 'sly-mrepl
|
||||
(set-face-attribute 'sly-mrepl-output-face nil :inherit 'default :foreground)
|
||||
|
|
Loading…
Reference in New Issue