Enable company-prescient, configure it for LSP.

This commit is contained in:
tastytea 2021-06-02 00:02:30 +02:00
parent dc98e20fe2
commit 2a41488ab0
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 6 additions and 2 deletions

View File

@ -78,7 +78,9 @@
;; Sorting and filtering for company.
(use-package company-prescient
:after (prescient company)
:hook (after-init . company-prescient-mode))
:config (defun my/company-prescient-sort-length-off ()
(setq-local company-prescient-sort-length-enable nil))
:hook (company-mode . company-prescient-mode))
(provide 'misc/completion)
;;; completion.el ends here

View File

@ -8,6 +8,7 @@
(require 'basics/global-variables)
(require 'programming/common)
(require 'text/common)
(require 'misc/completion)
;; Client for Language Server Protocol servers.
(use-package lsp-mode
@ -61,7 +62,8 @@
(css-mode . lsp)
(js-mode . lsp)
(lsp-mode . lsp-enable-which-key-integration)
(lsp-mode . my/rebind-other-file-maybe)))
(lsp-mode . my/rebind-other-file-maybe)
(lsp-mode . my/company-prescient-sort-length-off)))
;; Eye-candy and flycheck support for lsp-mode.
(use-package lsp-ui