Add irony-mode and platformio-mode to c/c++ mode.
(use-package irony
:ensure t
:commands (irony-mode))
(use-package irony-eldoc
:ensure t
:commands (irony-eldoc))
(use-package platformio-mode
:ensure t
:commands (platformio-conditionally-enable)
:config (platformio-setup-compile-buffer))
(defun irony-and-platformio-hook ()
(irony-mode)
(irony-eldoc)
(platformio-conditionally-enable))
(add-hook 'c-mode-hook 'irony-and-platformio-hook)
(add-hook 'c++-mode-hook 'irony-and-platformio-hook)
Replace the completion-at-point
and complete-symbol
bindings in
irony-mode’s buffers by the async functions.
(defun irony-use-async-ac ()
(define-key irony-mode-map [remap completion-at-point]
'irony-completion-at-point-async)
(define-key irony-mode-map [remap completion-symbol]
'irony-completion-at-point-async)
(irony-cdb-autosetup-compile-options))
(add-hook 'irony-mode-hook 'irony-use-async-ac)
Use Flycheck with Irony.
(use-package flycheck-irony
:ensure t
:defer 2
:init (add-hook 'flycheck-mode-hook #'flycheck-irony-setup))