SLY: Re-enable company completion.
Seems better overall, just need to make sure we don't miss symbols.master
parent
8517e1c7e5
commit
c4ee4c1456
|
@ -237,25 +237,29 @@ Good substitute for `sly-mrepl-indent-and-complete-symbol'."
|
||||||
(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)
|
(setq helm-company-initialize-pattern-with-prefix t)
|
||||||
;; (define-key lisp-mode-map (kbd "<tab>") 'ambrevar/indent-and-helm-company)
|
(add-hook 'lisp-mode-hook #'company-mode)
|
||||||
;; (define-key lisp-mode-map (kbd "M-<tab>") 'ambrevar/indent-and-helm-company)
|
(define-key lisp-mode-map (kbd "<tab>") 'ambrevar/indent-and-helm-company)
|
||||||
;; (defun ambrevar/sly-set-keys ()
|
(define-key lisp-mode-map (kbd "M-<tab>") 'ambrevar/indent-and-helm-company)
|
||||||
;; (define-key sly-mrepl-mode-map (kbd "<tab>") 'ambrevar/indent-and-helm-company)
|
(defun ambrevar/sly-set-keys ()
|
||||||
;; (define-key sly-mrepl-mode-map (kbd "M-<tab>") 'ambrevar/indent-and-helm-company))
|
(define-key sly-mrepl-mode-map (kbd "<tab>") 'ambrevar/indent-and-helm-company)
|
||||||
;; (add-hook 'sly-mrepl-hook #'ambrevar/sly-set-keys)
|
(define-key sly-mrepl-mode-map (kbd "M-<tab>") 'ambrevar/indent-and-helm-company))
|
||||||
;; (add-hook 'sly-mrepl-hook #'company-mode))
|
(add-hook 'sly-mrepl-hook #'ambrevar/sly-set-keys)
|
||||||
)
|
(add-hook 'sly-mrepl-hook #'company-mode)))
|
||||||
;; Cons of internal completion vs. company completion.
|
;; Pros and cons of internal completion vs. company completion.
|
||||||
|
;; Cons:
|
||||||
;; - Internal does not support spaces like Helm does.
|
;; - Internal does not support spaces like Helm does.
|
||||||
;; - Word order matters.
|
;; - Word order matters.
|
||||||
;; - Cannot complete against current package.
|
;; - Cannot complete against current package.
|
||||||
;; - [ ] File completion does not work.
|
;; - [ ] File completion does not work.
|
||||||
;; Pros:
|
;; Pros:
|
||||||
;; - Current suffix is included.
|
;; - [X] Current prefix is included in completion input.
|
||||||
|
;; Fix: (setq helm-company-initialize-pattern-with-prefix t)
|
||||||
;; - Less config.
|
;; - Less config.
|
||||||
|
;; - Company seem to miss some symbols?
|
||||||
|
;; Problem with cache?
|
||||||
|
;; https://github.com/joaotavora/sly/issues/328
|
||||||
|
|
||||||
(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