SLY: Fix lisp-mode and REPL bindings, enable company-mode in lisp-mode.

master
Pierre Neidhardt 2020-09-17 11:16:27 +02:00
parent 43b0046557
commit c9f45866a1
1 changed files with 8 additions and 3 deletions

View File

@ -79,9 +79,14 @@
;; (add-hook 'sly-mrepl-hook #'helm-sly-disable-internal-completion)
;; TODO: The above hangs Emacs 27, why?
(when (require 'helm-company nil :noerror)
(add-hook 'sly-mrepl-hook #'company-mode)
(define-key sly-mrepl-mode-map (kbd "<tab>") 'helm-company)
(define-key sly-mrepl-mode-map (kbd "M-<tab>") 'helm-company))))
(add-hook 'lisp-mode-hook #'company-mode)
(define-key lisp-mode-map (kbd "<tab>") 'helm-company)
(define-key lisp-mode-map (kbd "M-<tab>") 'helm-company)
(defun ambrevar/sly-set-keys ()
(define-key sly-mrepl-mode-map (kbd "<tab>") 'helm-company)
(define-key sly-mrepl-mode-map (kbd "M-<tab>") 'helm-company))
(add-hook 'sly-mrepl-hook #'ambrevar/sly-set-keys)
(add-hook 'sly-mrepl-hook #'company-mode))))
(defun ambrevar/sly-switch-to-repl () ; TODO: Replace with `helm-defswitch'.
(interactive)