Thankfully there is a way to hack on C in emacs. Namely, one needs rtags (from any given package repo) and irony-server. Once these are both setup, one can proceed to use rtags-find-symbol
to perform lookups and so forth.
Indexing your project
Simply navigate to your project directory and run;
rtags-rdm &
rtags-rc -J .
Emacs setup
Below are my emacs config settings:
(use-package rtags
:straight t
:defer nil
:ensure t
:config
(setq rtags-rc-binary-name "rtags-rc"))
(use-package company-c-headers
:defer nil
:ensure t)
(use-package company-irony
:defer nil
:ensure t
:config
(setq company-backends '((company-c-headers
company-dabbrev-code
company-irony))))
(use-package irony
:defer nil
:ensure t
:config
:hook
((c++-mode c-mode) . irony-mode)
('irony-mode-hook) . 'irony-cdb-autosetup-compile-options)
Happy hacking!