Open matthewbauer opened 6 years ago
Unless I am mistaken, there really is no point in having irony-mode enabled w/o the irony server, so I'd suggest disabling irony-mode.
Yes, but how to detect if irony server is available?
I want to be able to do something like this:
(irony-mode (irony--has-executable))
Where irony--has-executable-silent
gives me t
when the executable exists and nil
when it doesn't. You can kind of get this by catching irony--find-server-executable
but it will still show a message in each c buffer.
Yes it's possible.
I have no issue with exposing a public function:
(defun irony-find-server-executable ()
(let ((exec-path (cons (expand-file-name "bin" irony-server-install-prefix)
exec-path)))
(executable-find "irony-server")))
Which you could use in your config:
(irony-mode (and (irony-find-server-executable) t))
Is that sufficient?
If irony-server can't be found, I'd like to Irony to just silently turn itself off. Is this possible?
This would be useful for people that use the same config across multiple machines some which have "irony-server" installed and some that don't.