首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Haskell: ctag(和Kate编辑器)

Haskell: ctag(和Kate编辑器)
EN

Stack Overflow用户
提问于 2017-12-17 02:35:52
回答 1查看 366关注 0票数 0

我尝试了CTags插件的凯特编辑。它有点工作,索引构建静默(没有错误消息),数据库文件以及必要的菜单项出现。然后是Go to definition - No hits found

我并不感到太惊讶。显然,凯特是这样构建索引的:

代码语言:javascript
复制
ctags -R --c++-types=+px --extra=+q --excmd=pattern --exclude=Makefile --exclude=.

这让人联想到C++;我不能说更多。Haskell ctag的正确命令行是什么?

更新:

已经提出了hasktags。我设法安装并试运行了它:

代码语言:javascript
复制
$ stack exec hasktags
Usage: hasktags [OPTION...] [files or directories...]
directories will be replaced by DIR/**/*.hs DIR/**/*.lhs
Thus hasktags . tags all important files in the current
directory.

    If directories are symlinks they will not be followed
unless you pass -L.

A special file "STDIN" will make hasktags read the line separated file
list to be tagged from STDIN.

  -c            --ctags                        generate CTAGS file (ctags)
  -e            --etags                        generate ETAGS file (etags)
  -b            --both                         generate both CTAGS and ETAGS
  -a            --append                       append to existing CTAGS and/or ETAGS file(s). Afterward this file will no longer be sorted!
                --ignore-close-implementation  ignores found implementation if it is closer than 7 lines - so you can jump to definition in one shot
  -o            --output=                      output to given file, instead of 'tags', '-' file is stdout
  -f            --file=                        same as -o, but used as compatibility with ctags
  -x            --extendedctag                 Generate additional information in ctag file.
                --cache                        Cache file data.
  -L            --follow-symlinks              follow symlinks when recursing directories
  -S[.hs,.lhs]  --suffixes[=.hs,.lhs]          list of hs suffixes including "."
  -R            --tags-absolute                make tags paths absolute. Useful when setting tags files in other directories
  -h            --help                         This help

在Kate CTags database file中也有一些路径。

代码语言:javascript
复制
/home/alexey/.local/share/kate/katectags/session_db_20171216_180641

我不能从hasktags自述文件中得到太多信息。

EN

回答 1

Stack Overflow用户

发布于 2017-12-17 07:59:10

我在.zshrc中使用了hasktag和外壳函数来简化操作:

代码语言:javascript
复制
hasktags --ignore-close-implementation --ctags .
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47848818

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档