Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using cedet semantic wisent-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?

like image 230
event_jr Avatar asked Sep 30 '11 14:09

event_jr


1 Answers

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

like image 120
Alex Ott Avatar answered Oct 18 '22 01:10

Alex Ott