使用 cedet 语义wisent-ruby
我刚刚开始按照包括 Alex Ott 在内的各种指南设置 cedet。
这是我到目前为止在初始化文件中的内容。
(require 'cedet)
(semantic-load-enable-code-helpers)
;; imenu breaks if I don't enable this
(global-semantic-highlight-func-mode 1)
(global-semantic-tag-folding-mode)
我非常喜欢代码折叠,因为语义比 hideshow 等包更了解代码。
我希望 ruby 有相同的折叠。我知道 cedet 还可以做其他事情,但我现在只是尝试一下。
所以我在 contrib/ 文件夹中看到了wisent-ruby.el。看起来语义确实知道如何解析 Ruby。 INSTALL 表示它应该“自动”安装。我打开一个 Ruby 文件,但代码折叠魔术三角形不存在。现在怎么办?
I'm just getting started setting up cedet following various guides including Alex Ott's.
Here is what I have so far in my init file.
(require 'cedet)
(semantic-load-enable-code-helpers)
;; imenu breaks if I don't enable this
(global-semantic-highlight-func-mode 1)
(global-semantic-tag-folding-mode)
I quite like the code folding, because semantic know more about code than packages like hideshow, etc.
I would like to have the same folding for ruby. I know there is other stuff cedet does, but I'm just dipping my toes in for now.
So I see in the contrib/ folder there is wisent-ruby.el. It sure looks like semantic knows how to parse Ruby. The INSTALL says that it's supposed to be installed "automatically". I open up a Ruby file and code folding magic triangles aren't there. What now?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如我在
contrib-loaddefs.el
中看到的,正确的 hooks &仅针对 php 和 php 生成自动加载。 C# 模式。您可以显式加载wisent-ruby
并设置相应的钩子,如下例所示:但我没有检查折叠是否适用于 Ruby(因为我也不知道 Ruby 解析器的状态) )。您可以写信给 cedet 邮件列表,提出有关
wisent-ruby
的更多问题...As I see in
contrib-loaddefs.el
, correct hooks & autoloads are generated only for php & C# modes. You can explicitly loadwisent-ruby
and setup corresponding hook, as in following example:but I hadn't checked, does folding works for Ruby or not (because I also don't know status of Ruby parser). You can write to cedet mailing list with more questions about
wisent-ruby
...