rubyemacsfoldingcedetemacs-semantic

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?


Solution

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