Taglist-like Vim plugin for Rust?


Does anyone know of a Vim plugin similar to taglist for Rust?
Taglist is a source code browser that opens in a side pane. It shows classes, methods, and other declarations.
It’s useful for having an overview, especially of larger projects consisting of multiple files.

I know of racer-vim but it provides jump-to-definition and jump-to-help but not this. There’s also rusty-tags however I was unable to get its output to work with taglist in vim.


I’ve been using tagbar, but it’s not ideal either for rust. What we really need is a good etags implementation for rust.


ya that would be great
I’ve went with NERDTree for now, at least having a file list of the project gives me some overview, together with racer’s jump-to-definition it’s more or less convenient
should probably switch to a real IDE at some point but doesn’t really like something closed-source or overly heavy


The primary reasons I use vim are (1) convenience… I’m already in the terminal and I don’t want to switch to another window; (2) keyboard-oriented: I don’t like using mice; and (3) it’s already installed on most linux/macos boxes. I don’t think any IDE will ever have those features in the near-term…

Really, my rust/vim setup is pretty nice. The only thing missing is something like etags/tagbar/taglist.


More or less all the same reasons for me!

Just at times like this, hunting plugins, I wonder if I’m not spending too much time fighting my editor. Overall it’s nice though and I’m very used to it.


In my vimrc, <space>o is bound to :Outline, which displays the current file’s outline:

The outline can be interactively filtered by typing a pattern. Selecting an item and hitting enter takes you to the definition.

To set it up:

  • Install the fzf plugin.
  • Grab the Outline function.
  • Install ctags.
  • Add this to your ~/.ctags.


What’s not ideal about tagbar? Works great for me.


thanks a lot for the suggestions @mark-i-m @stjepang @lkurusa will check them out!

Edit: looks like tagbar was exactly what I was looking for; the difference with taglist is that it shows only the tags for the current file and not for the entire project, but that’s ok as I have a tree browser too now.


I will try that out @stjepang! Thanks :slight_smile:

@lkurusa If you have used tagbar with C++, you will note the difference :wink:


Just noticed that if a recent version of rust-vim plugin is installed, the changes to ~/.ctags and g:tagbar_type_rust are unnecessary—will even result in every tag being shown twice


@lkurusa I posted a more elaborate response here: https://internals.rust-lang.org/t/rust-2019-technical-debt-continued-productivity-and-stability/9004/3?u=mark-i-m


Thank you. I now see what could be improved.