From 2b4e7cdbf7d2b96437c0844e9fa26690733a1afe Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 22 Jun 2017 07:28:00 -0700 Subject: [PATCH] tools: make tag: add a .ctags file, more detailed tagging of non-haskell files --- .ctags | 22 ++++++++++++++++++++++ Makefile | 10 +++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .ctags diff --git a/.ctags b/.ctags new file mode 100644 index 000000000..5cb871643 --- /dev/null +++ b/.ctags @@ -0,0 +1,22 @@ +--exclude=.build +--exclude=.idea +--exclude=.shake +--exclude=.stack-work +--exclude=.vagrant +--exclude=.vscode +--exclude=_* +--exclude=bin +--exclude=doc/irc +--exclude=doc/profs +--exclude=dist +--exclude=examples +--exclude=bootstrap* +--exclude=excanvas* +--exclude=highslide* +--exclude=jquery* +--exclude=typeahead* +--exclude=old +--exclude=site/doc +--exclude=site/files +--exclude=site/hakyll-std +--exclude=tests/addons/hledger-* diff --git a/Makefile b/Makefile index 155431523..d5cbf40c3 100644 --- a/Makefile +++ b/Makefile @@ -1480,9 +1480,11 @@ cabalusage: \ $(call def-help,cabalusage, show size of cabal working dirs if any ) -du -shc */dist* 2>/dev/null -tag: emacstags \ +tag: emacstags-ctags \ $(call def-help,tag, generate tag files for source code navigation (for emacs) ) +# Tag haskell files with hasktags and just list the other main source files +# so they will be traversed by tags-search/tags-query-replace. emacstags: rm -f TAGS hasktags -e $(SOURCEFILES) @@ -1490,6 +1492,12 @@ emacstags: printf " \n$$f,1\n" >> TAGS; \ done +# Tag haskell files with hasktags and everything else not excluded by .ctags +# with (exuberant) ctags. +emacstags-ctags: + hasktags -e $(SOURCEFILES) + ctags -a -e -R + cleantags: \ $(call def-help-hide,cleantags, remove tag files ) rm -f TAGS tags