- Get the tool: git clone https://aur.archlinux.org/packages/rtags-git/ ; cd rtags-git/ ; makepkg -si
- Alternatively run `rtags-install` within emacs.
- Start the server: rdm &
- Index your project: cd project-code-dir/ ; make -nk | rc -c -
(require 'rtags)
(require 'company-rtags)
(setq rtags-completions-enabled t)
(eval-after-load 'company
'(add-to-list
'company-backends 'company-rtags))
(setq rtags-autostart-diagnostics t)
(rtags-enable-standard-keybindings)
(define-key c-mode-base-map (kbd "M-.") 'rtags-find-symbol-at-point)
(define-key c-mode-base-map (kbd "M-,") 'rtags-location-stack-back)
You may want to enable automatic starting of rdm:;; autostart rdm when entering c modes
(add-hook 'c-mode-hook 'rtags-start-process-unless-running)
(add-hook 'c++-mode-hook 'rtags-start-process-unless-running)
See also:
https://github.com/Andersbakken/rtags
http://syamajala.github.io/c-ide.html
No comments:
Post a Comment