首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >universal-ctags YAML支持

universal-ctags YAML支持
EN

Stack Overflow用户
提问于 2020-01-04 21:34:11
回答 2查看 146关注 0票数 1

我已经在我的苹果电脑上安装了最新版本的universal-ctags。我想索引yml文件,但是运行ctags --list-languages时没有将yml列为受支持的语言之一。然而,他们的documentation表示使用LibYamlAnsiblePlaybook libyaml支持ymls,并且这两个解析器是新添加的。

我该如何解决这个问题呢?我在互联网上搜索了很多,但很明显,还没有人遇到这个问题。

EN

回答 2

Stack Overflow用户

发布于 2021-09-14 05:45:09

很遗憾,Homebrew ctag不支持开箱即用的yaml

使用自制的ctag:

代码语言:javascript
复制
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

所以我只是简单地卸载了自制的ctag:

代码语言:javascript
复制
brew uninstall universal-ctags

,然后运行ctag安装manually

代码语言:javascript
复制
    $ 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

然后,利润:

代码语言:javascript
复制
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
票数 1
EN

Stack Overflow用户

发布于 2020-05-17 05:48:44

-- list -languages可能会将解析器列为"Yaml“。如果没有列出,则您的ctag不会链接到libyaml。./ctags --list-features的输出也很有用。如果libyaml正确链接到ctag,--list-features可能会列出"yaml“。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59591177

复制
相关文章

相似问题

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