diff options
author | johannst <johannes.stoelp@gmail.com> | 2019-09-06 22:08:20 +0200 |
---|---|---|
committer | johannst <johannes.stoelp@gmail.com> | 2019-09-06 22:08:20 +0200 |
commit | 95bc20fa96e9538cf771245ba798a8ef89e3b8d6 (patch) | |
tree | f263b7dcd18f274a4ba84c010fbf45db2b75fc21 /emacs.el | |
parent | f5d2040987742006aec3684d0c2cc175c2b9c72f (diff) | |
download | dotfiles-95bc20fa96e9538cf771245ba798a8ef89e3b8d6.tar.gz dotfiles-95bc20fa96e9538cf771245ba798a8ef89e3b8d6.zip |
emacs configure comapny mode + adding company c header
Diffstat (limited to 'emacs.el')
-rw-r--r-- | emacs.el | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -101,7 +101,24 @@ (use-package company :ensure t :config - (setq company-tooltip-align-annotations t) + (global-company-mode t) + (add-hook 'c++-mode-hook (lambda () (add-to-list 'company-dabbrev-code-modes 'c++-mode))) + (setq company-idle-delay 0 + company-minimum-prefix-length 1 + company-show-numbers t + company-dabbrev-downcase nil + company-tooltip-align-annotations t + ) + ) + +;; company-c-headers +(use-package company-c-headers + :ensure t + :requires (company) + :config + (add-to-list 'company-backends 'company-c-headers) + ;; simple heuristic to find latest c++ headers installed on system + (add-to-list 'company-c-headers-path-system (concat "/usr/include/c++/" (car (last (directory-files "/usr/include/c++" nil "^[1-9]"))))) ) ;; rust-mode |