universal-ctags
我已经在我的 Mac 上安装了最新版本的。我想索引yml
文件,但运行ctags --list-languages
没有yml
列为支持的语言之一。但是,他们的文档说使用LibYaml
and支持 ymls AnsiblePlaybook libyaml
,并且这两个解析器是新添加的。
我怎样才能解决这个问题?我在互联网上搜索了很多,但显然,还没有人遇到过这个问题。
universal-ctags
我已经在我的 Mac 上安装了最新版本的。我想索引yml
文件,但运行ctags --list-languages
没有yml
列为支持的语言之一。但是,他们的文档说使用LibYaml
and支持 ymls AnsiblePlaybook libyaml
,并且这两个解析器是新添加的。
我怎样才能解决这个问题?我在互联网上搜索了很多,但显然,还没有人遇到过这个问题。
不幸的是,自制 ctags 不支持开箱即用的 yaml
使用自制 ctags:
ctags --list-features
#NAME DESCRIPTION
case-insensitive-filenames TO BE WRITTEN
iconv can convert input/output encodings
option-directory TO BE WRITTEN
packcc has peg based parser(s)
regex can use regular expression based pattern matching
wildcards can use glob matching
xpath linked with library for parsing xml input
所以我只是卸载了自制 ctags:
brew uninstall universal-ctags
然后手动运行 ctags 安装:
$ git clone https://github.com/universal-ctags/ctags.git
$ cd ctags
$ ./autogen.sh
$ ./configure --prefix=/where/you/want # defaults to /usr/local
$ make
$ make install # may require extra privileges depending on where to install
然后,利润:
ctags --list-features
#NAME DESCRIPTION
case-insensitive-filenames TO BE WRITTEN
gnulib_fnmatch linked with the Gnulib fnmatch library
gnulib_regex linked with the Gnulib regular expression library
iconv can convert input/output encodings
interactive accepts source code from stdin
json supports json format output
option-directory TO BE WRITTEN
optscript can use the interpreter
packcc has peg based parser(s)
regex can use regular expression based pattern matching
wildcards can use glob matching
xpath linked with library for parsing xml input
yaml linked with library for parsing yaml input
--list-languages 可能会将解析器列为“Yaml”。如果未列出,则您的 ctags 不会链接到 libyaml。的输出./ctags --list-features
也很有帮助。如果 libyaml 正确链接到 ctags,--list-features
可能会列出“yaml”。