SLY: Use helm-sly instead of helm-lisp and use native Helm completion.
parent
383e3e7b3d
commit
236bfd1e56
|
@ -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"))
|
||||
|
|
Loading…
Reference in New Issue