SLY: Use internal completion instead of Company.
parent
0410f342a2
commit
ed5c68bcbe
|
@ -264,19 +264,29 @@ Good substitute for `sly-mrepl-indent-and-complete-symbol'."
|
||||||
|
|
||||||
;; REVIEW: With Emacs 27 we can:
|
;; REVIEW: With Emacs 27 we can:
|
||||||
;; (customize-set-variable 'helm-completion-style 'emacs)
|
;; (customize-set-variable 'helm-completion-style 'emacs)
|
||||||
;; (add-to-list 'completion-styles 'backend)
|
;; (add-to-list 'completion-styles 'backend) ; Useless?
|
||||||
(when (require 'helm-sly nil 'noerror)
|
(when (require 'helm-sly nil 'noerror)
|
||||||
;; (add-hook 'sly-mrepl-hook #'helm-sly-disable-internal-completion)
|
(add-hook 'sly-mrepl-hook #'helm-sly-disable-internal-completion)
|
||||||
;; REVIEW: Company completion has the benefit of having annotations.
|
;; REVIEW: Company completion has the benefit of having annotations.
|
||||||
(when (require 'helm-company nil :noerror)
|
;; (when (require 'helm-company nil :noerror)
|
||||||
(add-hook 'lisp-mode-hook #'company-mode)
|
;; (add-hook 'lisp-mode-hook #'company-mode)
|
||||||
(define-key lisp-mode-map (kbd "<tab>") 'ambrevar/indent-and-helm-company)
|
;; (define-key lisp-mode-map (kbd "<tab>") 'ambrevar/indent-and-helm-company)
|
||||||
(define-key lisp-mode-map (kbd "M-<tab>") 'ambrevar/indent-and-helm-company)
|
;; (define-key lisp-mode-map (kbd "M-<tab>") 'ambrevar/indent-and-helm-company)
|
||||||
(defun ambrevar/sly-set-keys ()
|
;; (defun ambrevar/sly-set-keys ()
|
||||||
(define-key sly-mrepl-mode-map (kbd "<tab>") 'ambrevar/indent-and-helm-company)
|
;; (define-key sly-mrepl-mode-map (kbd "<tab>") 'ambrevar/indent-and-helm-company)
|
||||||
(define-key sly-mrepl-mode-map (kbd "M-<tab>") 'ambrevar/indent-and-helm-company))
|
;; (define-key sly-mrepl-mode-map (kbd "M-<tab>") 'ambrevar/indent-and-helm-company))
|
||||||
(add-hook 'sly-mrepl-hook #'ambrevar/sly-set-keys)
|
;; (add-hook 'sly-mrepl-hook #'ambrevar/sly-set-keys)
|
||||||
(add-hook 'sly-mrepl-hook #'company-mode)))
|
;; (add-hook 'sly-mrepl-hook #'company-mode))
|
||||||
|
)
|
||||||
|
;; Cons of internal completion vs. company completion.
|
||||||
|
;; - Internal does not support spaces like Helm does.
|
||||||
|
;; - Word order matters.
|
||||||
|
;; - Cannot complete against current package.
|
||||||
|
;; - [ ] File completion does not work.
|
||||||
|
;; Pros:
|
||||||
|
;; - Current suffix is included.
|
||||||
|
;; - Less config.
|
||||||
|
|
||||||
|
|
||||||
(when (require 'helm-selector nil :noerror)
|
(when (require 'helm-selector nil :noerror)
|
||||||
(require 'init-sly-selector))
|
(require 'init-sly-selector))
|
||||||
|
|
Loading…
Reference in New Issue