Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I configure Emacs speedbar for C# mode?

Tags:

c#

emacs

I'm using Emacs with C# Mode and when I turn on the speedbar, no files show up by default. I can choose "show all files" on the speedbar mode, but then every .cs file shows up with a '[?]' next to the name. How do I properly configure speedbar so it shows up with .cs files by default? How do I get the '[+]' next to each file so I can navigate inside the file?

like image 376
Alex B Avatar asked Nov 03 '08 17:11

Alex B


3 Answers

I think ECB with CEDET is simply too bloated. I use speedbar alone with emacs and I use the original parser for C/C++. Just add this line to your .emacs and you'll be ok:

   (speedbar-add-supported-extension ".cs")
   (add-to-list 'speedbar-fetch-etags-parse-list
            '("\\.cs" . speedbar-parse-c-or-c++tag))

This handles C# perfectly without a problem. Hope this helps.

like image 153
user9252 Avatar answered Nov 14 '22 20:11

user9252


I used speedbar earlier and got really irritated. I now use ECB. ECB uses its own buffer for the tree and can optionally show the outline of the CS file in a separate buffer. They all fit in the same frame while Speedbar has its own frame.

I have some custom stuff setup for ECB. You can see it here.

like image 44
Vagmi Mudumbai Avatar answered Nov 14 '22 21:11

Vagmi Mudumbai


It works for me.

I used

(speedbar-add-supported-extension ".cs") 

and got this:

alt text

like image 37
Cheeso Avatar answered Nov 14 '22 21:11

Cheeso