diff options
Diffstat (limited to 'init.org')
-rw-r--r-- | init.org | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -564,11 +564,20 @@ The default prompt face makes it hard to see the prompt. :noweb-ref: completion :END: +Company mode provides automatic completion. I like to enable it in all programming modes. I don’t use the global company mode because that would enable it in =org-mode= where the pop-up looks terrible with =variable-pitch-mode= enabled. + +#+BEGIN_SRC elisp +(add-hook 'prog-mode-hook 'company-mode) +#+END_SRC + +I like automatic completion, but it’s nice to also have a key to trigger completion. + #+BEGIN_SRC elisp -(add-hook 'after-init-hook 'global-company-mode) (setq company-idle-delay 0.5) (define-key company-mode-map (kbd "C-c <tab>") 'company-complete) +#+END_SRC +#+BEGIN_SRC elisp (require 'color) (let ((bg (face-attribute 'default :background))) (custom-set-faces |