summaryrefslogtreecommitdiff
path: root/config.org
diff options
context:
space:
mode:
Diffstat (limited to 'config.org')
-rw-r--r--config.org28
1 files changed, 28 insertions, 0 deletions
diff --git a/config.org b/config.org
index a926691..1925763 100644
--- a/config.org
+++ b/config.org
@@ -539,8 +539,36 @@ Company is an autocompletion frontend
#+begin_src emacs-lisp
(use-package company
:ensure t
+ :config
+ (setq company-idle-delay 0)
+ (setq company-minimum-prefix-length 3)
:init
(add-hook 'after-init-hook 'global-company-mode))
+
+ (with-eval-after-load 'company
+ (define-key company-active-map (kbd "M-n") nil)
+ (define-key company-active-map (kbd "M-p") nil)
+ (define-key company-active-map (kbd "C-n") 'company-select-next)
+ (define-key company-active-map (kbd "C-p") 'company-select-previous))
+#+end_src
+
+** Initialize =company-irony=
+
+Autocompletion backend for C and C++
+
+#+begin_src emacs-lisp
+ (use-package company-irony
+ :ensure t
+ :config
+ (require 'company)
+ (add-to-list 'company-backends 'company-irony))
+
+ (use-package irony
+ :ensure t
+ :config
+ (add-hook 'c++-mode-hook 'irony-mode)
+ (add-hook 'c-mode-hook 'irony-mode)
+ (add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options))
#+end_src
* Custom keybinds