Setup `company' in a single section with a single listing

This commit is contained in:
Gerard Vermeulen 2023-12-05 09:56:39 +01:00
parent 49cce87503
commit 5d1dbc21f0

View File

@ -1347,21 +1347,6 @@ steps below.
Finally, [[https://company-mode.github.io/][company: a modular complete-anything framework for Emacs]] provides
completion in any buffer.
** [[info:company#Top][Company (info)]]
:PROPERTIES:
:CUSTOM_ID: sec:company
:END:
[[info:company#Top][Company (info)]] is a modular completion framework and the the snippet [[lst:ensure-company-installation][below]]
ensures its installation.
#+caption[Ensure =company= installation]:
#+caption: Ensure =company= installation.
#+name: lst:ensure-company-installation
#+begin_src emacs-lisp -n :results silent
(ensure-package-installation 'company)
#+end_src
** [[info:vertico#Top][Vertico (info)]]
:PROPERTIES:
:CUSTOM_ID: sec:vertico-configuration
@ -1583,18 +1568,19 @@ completion function [[info:elisp#Minibuffer Completion][completing-read]]. List
(keymap-global-set "M-y" #'consult-yank-pop))
#+end_src
** [[https://company-mode.github.io/][Company: a modular complete anything framework for Emacs]]
** [[https://company-mode.github.io/][Company (info)]]
:PROPERTIES:
:CUSTOM_ID: sec:company-setup
:END:
Listing [[lst:setup-company]] configures =company=.
[[info:company#Top][Company (info)]] is a modular completion framework and listing [[lst:setup-company]]
configures =company= after ensuring the =company= installation.
#+caption[Setup =company=]:
#+caption: Setup =company=.
#+name: lst:setup-company
#+begin_src emacs-lisp -n :results silent
(when (fboundp 'company-mode)
(when (ensure-package-installation 'company)
;; https://github.com/purcell/emacs.d/issues/778
(setopt company-transformers '(company-sort-by-occurrence))
(dolist (hook '(LaTeX-mode-hook