diff --git a/.emacs.d/lisp/init-lisp.el b/.emacs.d/lisp/init-lisp.el index 633e608e..3508c946 100644 --- a/.emacs.d/lisp/init-lisp.el +++ b/.emacs.d/lisp/init-lisp.el @@ -55,20 +55,22 @@ (ccl ("ccl")) (ecl ("ecl")))) (setq sly-command-switch-to-existing-lisp 'always) - (add-hook 'sly-mrepl-hook 'ambrevar/init-lispy) + (add-hook 'sly-mrepl-hook #'ambrevar/init-lispy) (add-hook 'sly-mrepl-hook #'rainbow-delimiters-mode) - (add-hook 'sly-mrepl-hook #'company-mode)) + (when (require 'helm-sly nil 'noerror) + (add-hook 'sly-mrepl-hook #'helm-sly-disable-internal-completion))) (defun ambrevar/sly-switch-to-repl () ; TODO: Replace with `helm-defswitch'. (interactive) (require 'sly) + (require 'helm-sly) (pcase (length sly-net-processes) (0 (sly)) (_ (let ((output-buffer (sly-mrepl--find-buffer (sly-current-connection)))) (cond ((and (eq (current-buffer) output-buffer) (require 'helm-slime nil 'no-error)) - (helm-lisp-mini)) + (helm-sly-mini)) (output-buffer (pop-to-buffer output-buffer)) (t (sly nil nil t))))))) @@ -124,6 +126,11 @@ (add-hook 'slime-repl-mode-hook 'ambrevar/init-lispy) (add-hook 'slime-repl-mode-hook #'ambrevar/slime-rainbow-init))) + +(when (require 'helm-sly nil 'noerror) + (global-helm-sly-mode) + (add-to-list 'helm-source-names-using-follow "Lisp xrefs")) + (when (require 'helm-slime nil 'noerror) (global-helm-slime-mode) (add-to-list 'helm-source-names-using-follow "SLIME xrefs"))