I'm having trouble getting the taglist plugin working properly with Scala. I've installed the plugin and ctags and verified that it works properly with Java and C++. I then followed the instructions on this page (minus the Lift specific instructuions), but was nothing shows up in the taglist window when I open it while editing a Scala file. Has anyone got this working and what are the proper steps? Thanks.
First check that your tags file has something in it. If you have followed the instructions on the page you mention, it should correctly identify classes, methods, etc. If that has worked then you can go to the next step.
The taglist plugin has a hardcoded list of supported language settings and Scala is not amongst them. So even if CTags generates the correct tags, the plugin will not read them in for this filetype.
It should be possible to add a definition as a global variable g:tlist_def_<lang>_settings
, but I haven't been able to get that to work. So you have to modify the taglist.vim file in your ~/.vim/plugin
directory to add Scala support. Don't worry, this is easy to do!
Search for the line that defines s:tlist_def_yacc_settings
and add the following couple of lines after it:
let s:tlist_def_scala_settings = 'scala;t:trait;c:class;T:type;' .
\ 'm:method;C:constant;l:local;p:package;o:object'
Now when you hit Ctrl-T you should see your generated Scala tags in the Tag List window.