c-c++ rtags: integration with evil

This commit is contained in:
Alexander Dalshov 2017-12-04 15:27:00 +03:00 committed by syl20bnr
parent bdcdc66c54
commit 7a74ae105a

View file

@ -34,8 +34,9 @@
xcscope xcscope
rtags rtags
(company-rtags :requires company rtags) (company-rtags :requires company rtags)
(flycheck-rtags :requires flycheck) (flycheck-rtags :requires flycheck rtags)
(helm-rtags :requires helm) (helm-rtags :requires helm rtags)
(ivy-rtags :requires ivy rtags)
)) ))
(defun c-c++/init-cc-mode () (defun c-c++/init-cc-mode ()
@ -257,7 +258,7 @@
:if c-c++-enable-rtags-support :if c-c++-enable-rtags-support
:init :init
(setq rtags-autostart-diagnostics t) (setq rtags-autostart-diagnostics t)
(setq rtags-display-result-backend 'helm) (add-hook 'rtags-jump-hook 'evil-set-jump)
(rtags-diagnostics) (rtags-diagnostics)
(define-key evil-normal-state-map (kbd "RET") 'rtags-select-other-window) (define-key evil-normal-state-map (kbd "RET") 'rtags-select-other-window)
(define-key evil-normal-state-map (kbd "M-RET") 'rtags-select) (define-key evil-normal-state-map (kbd "M-RET") 'rtags-select)
@ -286,4 +287,14 @@
(defun c-c++/init-helm-rtags () (defun c-c++/init-helm-rtags ()
(use-package helm-rtags (use-package helm-rtags
:if c-c++-enable-rtags-support)) :if c-c++-enable-rtags-support
:init
(setq rtags-display-result-backend 'helm)
))
(defun c-c++/init-ivy-rtags ()
(use-package ivy-rtags
:if c-c++-enable-rtags-support
:init
(setq rtags-display-result-backend 'ivy)
))