Using cedet semantic wisent-ruby
Asked Answered
B

1

6

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?

Bangtail answered 30/9, 2011 at 14:3 Comment(2)
As a note to those who came here through Google. I've since stopped using Cedet for Ruby, the parser doesn't work well enough and is no longer being developed.Bangtail
What are you using instead? RSense?Monadism
S
4

As I see in contrib-loaddefs.el, correct hooks & autoloads are generated only for php & C# modes. You can explicitly load wisent-ruby and setup corresponding hook, as in following example:

(require 'wisent-ruby)
(add-hook 'ruby-mode-hook #'wisent-ruby-default-setup)

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...

Smoking answered 30/9, 2011 at 14:54 Comment(2)
Code folding works great. There are a couple of issues with wisent-ruby.el, which I'm trying to sort out on the cedet-devel mailing list.Bangtail
Yes, mailing list is best place to discuss such problems ;-)Smoking

© 2022 - 2024 — McMap. All rights reserved.