From 6a562d63983efdbbb919dfdfa447225c94a06c4b Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Wed, 21 Sep 2016 17:02:22 -0700 Subject: [PATCH] [Emacs] Add ggtags setup --- dotfiles/emacs.d/README.org | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index de0cecbb..f0d6a232 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -2352,6 +2352,27 @@ Intero seems to be causing hangs, so it has been disabled :config (add-to-list 'company-backend 'company-ghc)) #+END_SRC +**** C/C++ +#+BEGIN_SRC emacs-lisp +(use-package cc-mode + :preface + (defun imalison:cc-mode-hook () + (when (derived-mode-p 'c-mode 'c++-mode 'java-mode 'asm-mode) + (ggtags-mode 1))) + :config + (progn + (use-package ggtags + :demand t + :bind (:map ggtags-mode-map + ("C-c g s" . ggtags-find-other-symbol) + ("C-c g h" . ggtags-view-tag-history) + ("C-c g r" . ggtags-find-reference) + ("C-c g f" . ggtags-find-file) + ("C-c g c" . ggtags-create-tags) + ("C-c g u" . ggtags-update-tags) + ("M-," . pop-tag-mark))) + (add-hook 'c-mode-common-hook 'imalison:cc-mode-hook))) +#+END_SRC *** Data/Config/Protocol **** thrift #+BEGIN_SRC emacs-lisp