Rls: Does not support jumping to definitions in stdlib

Created on 14 Sep 2017  路  5Comments  路  Source: rust-lang/rls

This is probably a duplicate of #227 feel free to close in lieu of that, but I wanted to surface the actual issue in a more clear way.

In that thread @jonathandturner said (https://github.com/rust-lang-nursery/rls/issues/227#issuecomment-297220808) 'Most users don't want to jump into standard library'. I personally disagree strongly, am willing to accept that I am in the minority but don't think that I am. Jumping into the standard library is one of my favorite features of other IDE's (or the racer plugin in atom for that matter), because I can figure out how things work, and see the docs inline easily in stdlib.

I'll definitely try to figure out how to make it work if it would be accepted, but don't want to waste time if this is considered an anti-feature. I also understand if this will be technically very difficult after we stop using Racer and that's the actual reason for not wanting to do this.

It is frustrating that this works in racer, but not in rls. I symlinked my $RUST_SRC_PATH to /src as a workaround for atom, but can't make it work in vscode (I guess a project_directory/src symlink would work, but that competes with the project's src dir).

Thanks for all the work you've done on this software, I like it a lot other than this. 馃挅

Most helpful comment

Going to the lib source is a great option. Unlike C++ the code in rust's std lib is quite readable. I don't understand why it is considered a bad thing to jump to the std lib's source.

All 5 comments

I think the comments in that thread are somewhat out of date. We now have source code for the standard libs as standard (from Rustdoc) and I think jumping to the source is probably the best thing to do (the alternative is opening an HTML preview of the docs, but given that would just be a rendering of the markdown at best (not full Rustdoc) I'm not sure if that is a good alternative).

Going to the lib source is a great option. Unlike C++ the code in rust's std lib is quite readable. I don't understand why it is considered a bad thing to jump to the std lib's source.

I think the main problem was not shipping with rust-src, but since rustdoc depends on that now, if I'm not mistaken, this is a feature we'd like to see implemented (https://github.com/rust-lang-nursery/rls/pull/480 addresses that) :smile: .

Can't wait for #480 to land :+1:

Closing in favour of #227

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jamesmahler picture jamesmahler  路  5Comments

ZoeyR picture ZoeyR  路  3Comments

benmarten picture benmarten  路  3Comments

rcjsuen picture rcjsuen  路  5Comments

wagnerf42 picture wagnerf42  路  3Comments