From 2dff64d9b45c41572ecbab4a370656a246e220ad Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sat, 20 Jan 2018 16:57:10 +0100 Subject: [PATCH] feat(lisp): Configure company-mode for Common Lisp --- init/lisp-setup.el | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/init/lisp-setup.el b/init/lisp-setup.el index 816d34b37..e4174b587 100644 --- a/init/lisp-setup.el +++ b/init/lisp-setup.el @@ -3,11 +3,20 @@ ;; All the lisps: +(add-to-list 'lisp-mode-hook #'company-mode) (add-to-list 'lisp-mode-hook #'paredit-mode) +(define-key lisp-mode-map (kbd "TAB") + #'company-indent-or-complete-common) + ;; Common Lisp: -(load (expand-file-name "~/quicklisp/slime-helper.el")) (setq inferior-lisp-program (concat (nix-store-path "sbcl") "/bin/sbcl")) -(setq slime-contribs '(slime-fancy)) + +(add-to-list 'company-backends 'sly-company) +(add-to-list 'sly-mrepl-mode-hook #'paredit-mode) +(add-to-list 'sly-mrepl-mode-hook #'company-mode) + +(define-key sly-mrepl-mode-map (kbd "TAB") + #'company-indent-or-complete-common) (provide 'lisp-setup)