diff options
| author | yuzu-eva <stevenhu@web.de> | 2023-04-03 13:09:52 +0200 |
|---|---|---|
| committer | yuzu-eva <stevenhu@web.de> | 2023-04-03 13:09:52 +0200 |
| commit | dc536cd2b9980a71f5569b11822fbdfd1b91376f (patch) | |
| tree | 5ce96e1281305cd26b7717c63c37de82e5d7c220 | |
| parent | a4edc54d04b7d58a5d35b94582d90b0f4e288f05 (diff) | |
feat: added irony, autocompletion backend for C/C++
| -rw-r--r-- | .gitignore | 5 | ||||
| -rw-r--r-- | config.org | 28 |
2 files changed, 31 insertions, 2 deletions
@@ -9,8 +9,9 @@ tramp auto-save-list/ elpa/ -transient/ -lisp/** games/ +irony/ +lisp/ +transient/ !lisp/rainbow-delimiters.el @@ -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 |
