(use-package company
  :defer 2
  :diminish company-mode
  :config (global-company-mode t))

;; C
(use-package irony
  :defer 2
  :diminish irony-mode
  :config
  (add-hook 'c++-mode-hook 'irony-mode)
  (add-hook 'c-mode-hook 'irony-mode)
  (add-hook 'objc-mode-hook 'irony-mode)
  (add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options)

  (add-hook 'c-mode-hook
    (lambda () (local-set-key (kbd "<tab>") #'company-complete)
      (local-set-key (kbd "C-SPC") #'company-complete-selection))))

(use-package company-c-headers
  :defer 2
  :config
  (add-to-list 'company-backends 'company-c-headers))


(use-package company-irony-c-headers
  :defer 2
  :config
  (eval-after-load 'company
    '(add-to-list
       'company-backends '(company-irony-c-headers company-irony))))

(use-package company
  :defer 2
  :diminish company-mode
  :config (global-company-mode t))

;; C
(use-package irony
  :defer 2
  :diminish irony-mode
  :config
  (add-hook 'c++-mode-hook 'irony-mode)
  (add-hook 'c-mode-hook 'irony-mode)
  (add-hook 'objc-mode-hook 'irony-mode)
  (add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options)

  (add-hook 'c-mode-hook
    (lambda () (local-set-key (kbd "<tab>") #'company-complete)
      (local-set-key (kbd "C-SPC") #'company-complete-selection))))

(use-package company-irony-c-headers
  :defer 2
  :config
  (eval-after-load 'company
    '(add-to-list
       'company-backends '(company-irony-c-headers company-irony))))

Remove company-c-headers and use irony instead
Emacs: Remove company-c-headers and use irony instead

benmezger/dotfiles,benmezger/dotfiles,benmezger/dotfiles,benmezger/dotfiles