summaryrefslogtreecommitdiff
path: root/init.org
diff options
context:
space:
mode:
Diffstat (limited to 'init.org')
-rw-r--r--init.org11
1 files changed, 10 insertions, 1 deletions
diff --git a/init.org b/init.org
index 7e23893..6e4850f 100644
--- a/init.org
+++ b/init.org
@@ -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