lang/cc: fix irony-mode complaining in non-C modes, like php-mode
This commit is contained in:
parent
e87b788078
commit
1ebc4c9594
1 changed files with 5 additions and 1 deletions
|
@ -110,7 +110,11 @@ compilation database is present in the project.")
|
|||
:after cc-mode
|
||||
:commands irony-install-server
|
||||
:preface (setq irony-server-install-prefix (concat doom-etc-dir "irony-server/"))
|
||||
:hook ((c-mode c++-mode objc-mode) . irony-mode)
|
||||
:init
|
||||
(defun +cc|init-irony-mode ()
|
||||
(when (memq major-mode '(c-mode c++-mode objc-mode))
|
||||
(irony-mode +1)))
|
||||
(add-hook! (c-mode c++-mode objc-mode) #'+cc|init-irony-mode)
|
||||
:config
|
||||
(unless (file-directory-p irony-server-install-prefix)
|
||||
(warn "irony-mode: server isn't installed; run M-x irony-install-server"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue