use-package company

This commit is contained in:
larstvei 2023-06-11 22:16:38 +02:00
parent f8a4292a6a
commit ba0e3ed58e

View File

@ -207,8 +207,7 @@
(let* ((package--builtins nil) (let* ((package--builtins nil)
(packages (packages
'(company ; Modular text completion framework '(company-coq ; A collection of extensions PG's Coq mode
company-coq ; A collection of extensions PG's Coq mode
counsel ; Various completion functions using Ivy counsel ; Various completion functions using Ivy
counsel-projectile ; Ivy integration for Projectile counsel-projectile ; Ivy integration for Projectile
dashboard ; A startup screen extracted from Spacemacs dashboard ; A startup screen extracted from Spacemacs
@ -423,7 +422,6 @@
delete-selection-mode ; Replace selected text delete-selection-mode ; Replace selected text
dirtrack-mode ; directory tracking in *shell* dirtrack-mode ; directory tracking in *shell*
editorconfig-mode ; Use editorconfig editorconfig-mode ; Use editorconfig
global-company-mode ; Auto-completion everywhere
global-diff-hl-mode ; Highlight uncommitted changes global-diff-hl-mode ; Highlight uncommitted changes
global-so-long-mode ; Mitigate performance for long lines global-so-long-mode ; Mitigate performance for long lines
counsel-projectile-mode ; Manage and navigate projects counsel-projectile-mode ; Manage and navigate projects
@ -642,13 +640,21 @@
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq company-idle-delay 0 ;; Modular text completion framework
company-echo-delay 0 (use-package company
company-dabbrev-downcase nil :bind (:map company-active-map
company-minimum-prefix-length 2 ("C-d" . 'company-show-doc-buffer)
company-selection-wrap-around t ("C-n" . 'company-select-next)
company-transformers '(company-sort-by-occurrence ("C-p" . 'company-select-previous))
company-sort-by-backend-importance)) :config
(setq company-idle-delay 0
company-echo-delay 0
company-dabbrev-downcase nil
company-minimum-prefix-length 2
company-selection-wrap-around t
company-transformers '(company-sort-by-occurrence
company-sort-by-backend-importance))
(global-company-mode 1))
#+end_src #+end_src
@ -1586,17 +1592,6 @@
#+end_src #+end_src
** Bindings for [[http://company-mode.github.io/][company-mode]]
#+begin_src emacs-lisp
(define-key company-active-map (kbd "C-d") 'company-show-doc-buffer)
(define-key company-active-map (kbd "C-n") 'company-select-next)
(define-key company-active-map (kbd "C-p") 'company-select-previous)
(define-key company-active-map (kbd "<tab>") 'company-complete)
#+end_src
** Bindings for [[https://github.com/bbatsov/projectile][Projectile]] ** Bindings for [[https://github.com/bbatsov/projectile][Projectile]]
#+begin_src emacs-lisp #+begin_src emacs-lisp