Add helm-gtags section

This commit is contained in:
laurensmiers 2018-06-12 21:19:17 +02:00
parent 27b84978a7
commit dc8880dfc1
2 changed files with 23 additions and 19 deletions

View file

@ -470,6 +470,8 @@ To be fair, I didn't test this in a while...
* Helm * Helm
** General config
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package helm (use-package helm
:ensure t :ensure t
@ -534,6 +536,27 @@ To be fair, I didn't test this in a while...
#+END_SRC #+END_SRC
** Helm-gtags
#+BEGIN_SRC emacs-lisp
(use-package helm-gtags
:ensure t
:bind
( "M-." . 'helm-gtags-find-tag-from-here)
( "M-," . 'helm-gtags-pop-stack)
( "C-c f" . 'helm-gtags-find-files)
( "C-c p" . 'helm-gtags-parse-file)
:config
(add-hook 'c-mode-hook 'helm-gtags-mode)
(add-hook 'c++-mode-hook 'helm-gtags-mode)
(add-hook 'python-mode-hook 'helm-gtags-mode)
(add-hook 'java-mode-hook 'helm-gtags-mode)
(add-hook 'asm-mode-hook 'helm-gtags-mode)
(custom-set-variables '(helm-gtags-auto-update t))
)
#+END_SRC
* Old stuff, maybe usefull for lookup later * Old stuff, maybe usefull for lookup later
** Diff mode stuff ** Diff mode stuff

View file

@ -1,19 +0,0 @@
(require 'helm-gtags)
;; Enable helm-gtags-mode in languages that GNU Global supports
(add-hook 'c-mode-hook 'helm-gtags-mode)
(add-hook 'c++-mode-hook 'helm-gtags-mode)
(add-hook 'python-mode-hook 'helm-gtags-mode)
(add-hook 'java-mode-hook 'helm-gtags-mode)
(add-hook 'asm-mode-hook 'helm-gtags-mode)
;; customize behaviour
(custom-set-variables
'(helm-gtags-auto-update t))
(global-set-key (kbd "M-.") 'helm-gtags-find-tag-from-here)
(global-set-key (kbd "M-,") 'helm-gtags-pop-stack)
(global-set-key (kbd "C-c C-f") 'helm-gtags-find-files)
(global-set-key (kbd "C-c g f") 'helm-gtags-parse-file)
(provide 'setup-helm-gtags)