March 16, 2021 ~ 1 min read

Emacs 27.1 C IDE


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!


Hi, I'm Ryan. I'm a software engineer from the UK. I've worked a startup previously where I made a pricing engine for a mobility hub as a service and now I'm at Amazon working on FireTV!