In particular, the lack of a useful
ctagsreplacement for Rust is a bit of a pain-point.
Could you elaborate on this point a bit? I think you can use ctags with rust, by providing the right regexes? Alternatively, RLS has “worksapceSymbol” request which is basically ctags?
If there’s really something missing here, I think it will be relatively easy to write something together on top of Rust-analyzer: it already has functionality to index the current project and crates-io deps and do a fuzzy-search on the index. This is currently exposed via the LSP protocol, but we can totally imagine a CLI interface for this.
Yes, you can use the regex-based mode, but the difference in quality/helpfulness is pretty noticable. You get way more useful semantic info with supported languages like C/C++ and Python. Perhaps a few examples might help.
I use the vim-tagbar pluggin, which uses ctags. Here is what I get with Python:
Notice that we have classes and methods, imports, and even some privacy information.
Here is what I get for C++:
Notice that we have
- nesting of types within namespaces
- privacy info
- grouping of fields, methods, typedefs, etc
- type info
Here is what I get with Rust:
- No type, privacy, or namespacing info
- No nesting of definitions. For example notice that
derefis not listed under
impl Deref for E820Info. If there were multiple implementations of
Derefin this file, they would all be listed one after the other under
constantsection also list associated items (e.g.
Targetis the associated type of
- Two of the constants are actually not
const. Rather, they are
This view does not help me understand the layout of the code in this file at all. It also doesn’t give a concise view of what fields, methods, etc each type or trait has. It doesn’t have any notion of privacy or namespacing.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.