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?

tshepang
  • 12,111
  • 21
  • 91
  • 136
event_jr
  • 17,467
  • 4
  • 47
  • 62
  • 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. – event_jr Feb 15 '12 at 11:31
  • 1
    What are you using instead? RSense? – N.N. Dec 19 '12 at 09:58

1 Answers1

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

Alex Ott
  • 80,552
  • 8
  • 87
  • 132