preservim / tagbar

Vim plugin that displays tags in a window, ordered by scope
https://preservim.github.io/tagbar
Other
6.1k stars 485 forks source link

universal-ctags settings for rust constant variable #818

Closed 4LPH4-Z3R0 closed 1 year ago

4LPH4-Z3R0 commented 2 years ago

In the wiki page: Support for additional filetypes

There are settings for universal-ctags to work on rust project:

image

However, these settings seem not working for rust constant variables on debian 11 and macos Montery with neovim (v0.7.0).

So I checked the original commit in the universal-ctags project : rust: Add support for constant parsing #3253 and [techee:rust2](https://github.com/techee/ctags/tree/rust2).

image

The code shows that the key for constants should be 'C' instead of 'v'.

After I changed the settings above ('C:constants:1:0' and 'C': 'variable'), things seem to work correctly.

Should this wiki page be updated?

alerque commented 2 years ago

Yes, it should. Feel free…

Also since uctags supports it now Rust support should be added to core of this plugin so no user config is necessary. I would facilitate a PR that makes that happen.