irony-mode icon indicating copy to clipboard operation
irony-mode copied to clipboard

Irony-mode was not enable by default in my c++mode

Open algogavin opened this issue 4 years ago • 0 comments

I have the following in my .emacs.d/init.el file, I would expect it will enable the Irony mode when I open my C++ file, but it's not. As a workaround for now, I have to explicitly type "M-x irony-mode" to enable it.

; == irony-mode == (use-package irony :ensure t :defer t :init (add-hook 'c++-mode-hook 'irony-mode) (add-hook 'c-mode-hook 'irony-mode) (add-hook 'objc-mode-hook 'irony-mode) :config ;; replace the completion-at-point' and complete-symbol' bindings in ;; irony-mode's buffers by irony-mode's function (defun my-irony-mode-hook () (define-key irony-mode-map [remap completion-at-point] 'irony-completion-at-point-async) (define-key irony-mode-map [remap complete-symbol] 'irony-completion-at-point-async)) (add-hook 'irony-mode-hook 'my-irony-mode-hook) (add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options) ;; (add-hook 'irony-mode-hook 'irony-eldoc) )

I also try to add these as suggested--> (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)

but it's not helping though. Any help?

algogavin avatar Jan 31 '21 14:01 algogavin