-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a tool to generate semantically correct tags files #10317
Comments
I'm working on this. As someone who doesn't use vim for code editing, would the extra information in the extended format actually be used intelligently for rust programs? I'm talking about marking what kind of tag it is and marking what class a method belongs to and such. |
@dcrewi Yes, Vim can make use of extended information; for example, I tried modifying my
(Of course, we are here speaking of tags which are inherently fairly dumb; intelligent completion is a completely distinct project of significantly greater difficulty which is covered elsewhere.) The ability to specify whether private things should have tags made for them or not would be good, too. (If I'm working on a crate, I want all the tags, but if it's just a dependency of mine I probably only want public tags.) |
Is there any movement on this? Is there any progress that can be continued? |
There was some progress, but it has bitrotted. The general idea is to walk a filesystem searching for "lib.rs" or "main.rs" (though now that cargo exists, it should probably look for cargo files as well), use libsyntax to parse crates into AST, and collect tags by walking the AST using a |
Some thoughts: There is no reason to do this as part of rustdoc that I can see, it seems independent. I'd probably like it to be part of Coupling it to The TAGS file should be generated after parsing but before type check, so that you get TAGS files even if compilation errors occur. |
(Probably we should make the command line interface something explicitly unstable.) |
Anyway I really want this, wherever it lives ;) |
I'm pulling a massive triage effort to get us ready for 1.0. As part of this, I'm moving stuff that's wishlist-like to the RFCs repo, as that's where major new things should get discussed/prioritized. This issue has been moved to the RFCs repo: rust-lang/rfcs#656 |
… r=Manishearth Add `suspicious_command_arg_space` lint Fixes rust-lang#10316 --- changelog: New lint: [`suspicious_command_arg_space`] [rust-lang#10317](rust-lang/rust-clippy#10317) <!-- changelog_checked -->
Currently we have the
TAGS.vi
andTAGS.emacs
rules which use Exuberant Ctags and regular expressions to produce a very useful but not particularly brilliant result. Now that we have librustdoc, we can do much better, rather quickly! I want a tool (quite probably built into rustdoc, actually) which can generate semantically correct and optimally useful tags files for the Vim and Emacs standards. Doing this absolutely correctly will be a great help to developers, who will already benefit if they go to the trouble of ensuring they have the tags files loaded in their editor.This will allow things like adding enum variants to the tags file which probably can't be done correctly at present (and no attempt is made) as I think you could have further nested parentheses inside the variant, e.g. I think
Foo((), (bar, ()))
would be valid, but it'd make a mess of a regex-based rule unless recursion could actually be managed in a nasty hacky way.The text was updated successfully, but these errors were encountered: