2018-07-07 22:34:00 +02:00
|
|
|
;;; em-helm-gtags.el --- Module file for GTAGS with Helm configuration.
|
2017-09-02 21:37:40 +02:00
|
|
|
;;
|
|
|
|
;; Copyright (C) 2017 Wojciech Kozlowski
|
|
|
|
;;
|
2018-02-04 18:18:18 +01:00
|
|
|
;; Author: Wojciech Kozlowski <wk@wojciechkozlowski.eu>
|
2017-09-02 21:37:40 +02:00
|
|
|
;; Created: 2 Sep 2017
|
|
|
|
;;
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
;;
|
|
|
|
;;; Commentary:
|
|
|
|
;;
|
|
|
|
;; This module sets up configuration for using gtags with helm.
|
|
|
|
;;
|
|
|
|
;; To add gtags for system include paths:
|
|
|
|
;;
|
|
|
|
;; export GTAGSLIBPATH=$HOME/.gtags/
|
|
|
|
;;
|
|
|
|
;; mkdir ~/.gtags
|
|
|
|
;; cd ~/.gtags
|
|
|
|
;;
|
|
|
|
;; ln -s /usr/include usr-include
|
|
|
|
;; ln -s /usr/local/include/ usr-local-include
|
|
|
|
;;
|
|
|
|
;; gtags -c
|
|
|
|
;;
|
|
|
|
;;; License: GPLv3
|
|
|
|
|
|
|
|
;;; Required packages:
|
|
|
|
|
2018-07-07 22:34:00 +02:00
|
|
|
;;; Code:
|
2017-09-02 21:37:40 +02:00
|
|
|
|
2018-07-07 22:34:00 +02:00
|
|
|
(defvar emodule/em-helm-gtags-packages
|
2017-09-02 21:37:40 +02:00
|
|
|
|
2018-07-07 22:34:00 +02:00
|
|
|
'(helm-gtags)
|
|
|
|
|
|
|
|
)
|
2017-09-02 21:37:40 +02:00
|
|
|
|
|
|
|
;;; Configuration:
|
|
|
|
|
2018-07-07 22:34:00 +02:00
|
|
|
(defun emodule/em-helm-gtags-init ()
|
|
|
|
"Initialise the `em-helm-gtags' module."
|
2017-09-02 21:37:40 +02:00
|
|
|
|
|
|
|
(use-package helm-gtags
|
2018-07-08 01:29:39 +02:00
|
|
|
:hook
|
|
|
|
((dired-mode eshell-mode c-mode c++-mode asm-mode-hook) . helm-gtags-mode)
|
|
|
|
:bind
|
|
|
|
(:map helm-gtags-mode-map
|
|
|
|
("C-c g a" . helm-gtags-tags-in-this-function)
|
|
|
|
("C-c g h" . helm-gtags-show-stack)
|
|
|
|
("C-j" . helm-gtags-select)
|
|
|
|
("M-." . helm-gtags-dwim)
|
|
|
|
("M-," . helm-gtags-pop-stack)
|
|
|
|
("C-c <" . helm-gtags-previous-history)
|
|
|
|
("C-c >" . helm-gtags-next-history))
|
2017-09-02 21:37:40 +02:00
|
|
|
:init
|
2018-07-08 01:29:39 +02:00
|
|
|
(setq helm-gtags-ignore-case t
|
|
|
|
helm-gtags-auto-update t
|
|
|
|
helm-gtags-use-input-at-cursor t
|
|
|
|
helm-gtags-pulse-at-cursor t
|
|
|
|
helm-gtags-prefix-key "\C-cg"
|
|
|
|
helm-gtags-suggested-key-mapping t))
|
2017-09-02 21:37:40 +02:00
|
|
|
)
|
2018-07-07 22:34:00 +02:00
|
|
|
|
|
|
|
(provide 'em-helm-gtags)
|
|
|
|
;;; em-helm-gtags.el ends here
|