Open luisfernrg opened 7 years ago
This is working correctly for me on linux, there are a few things you may want to try:
First, are there any obvious errors in the sublime text console? It can be shown from View->Show Console, and it will contain the output of any failed racer
command calls.
Second, just to make sure, did you install the source? This might be obvious, but rustup no longer installs source files and std docs by default, it will just download the binaries to save on network bandwidth and storage space.
Third, I guess, what racer version are you running? It's working for me with version 2.0.6, if you have an earlier version than that you may want to uninstall/reinstall with cargo install to update.
@daboross just check all three and everything is working racer isn't giving any errors, rust src is installed and I have the same racer version installed. What does your user config look by the way?
{
// The full path to the racer binary. If racer is already
// in your system path, then this default will be fine.
"racer": "racer",
// A list of search paths. This should generally just
// be the path to the rust compiler src/ directory.
"search_paths": [
"/home/daboross/.rustup/toolchains/beta-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/"
]
}
This is my config, it seems to be working alright. using racer
on the commandline also works. I'm using rustc 1.17.0-beta.3 and racer 2.0.6 compiled with that rust version.
@daboross when I type something like this ill get the pop up showing String as an option
use std::string::S
however I want to be able to type something like this and have all possible options for that to pop up
use std::string::
is there a way to do this?
Bump
Sorry I didn't reply to this - I completely thought that I'd put another message here...
@luisfernrg For me, RustAutoComplete does work like that. Right now I have rustc 1.23.0-nightly
, and racer 2.0.10
installed.
This... might just be an upgrade to racer though? I mean, I'm honestly not sure whether this worked with previous versions of racer or not. In any case, it does work the way you describe on my machine currently with the latest racer version.
Edit: My current config is:
{
// The full path to the racer binary. If racer is already
// in your system path, then this default will be fine.
"racer": "racer",
// A list of search paths. This should generally just
// be the path to the rust compiler src/ directory.
"search_paths": [
"/home/daboross/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/"
]
}
Edit: one other thing I forgot to mention... I'm using Sublime Text 3 for this - is there any possibility you're trying with ST2, and there's a difference there?
@daboross I'm using the same version of racer and rustc but still no luck.
@zatherz are you also on Mac OS X
Edit: I'm also using Sublime Text 3
I'm on Linux, Arch Linux to be more specific. Racer 2.0.12, Rust 1.21.0.
hm, that's strange - I mean, I'm tried this on both Gentoo and Ubuntu 17.10, and it's worked fine for me.
You're both using RustAutoComplete v0.9.0 installed via Package Control, right? (I checked via action "List Packages")
Does running racer complete std::string::
in a terminal work correctly for both of you? My output is below:
$ racer complete std::string::
MATCH String,294,11,/home/daboross/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/../liballoc/string.rs,Struct,pub struct String
MATCH FromUtf8Error,335,11,/home/daboross/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/../liballoc/string.rs,Struct,pub struct FromUtf8Error
MATCH FromUtf16Error,360,11,/home/daboross/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/../liballoc/string.rs,Struct,pub struct FromUtf16Error(());
MATCH ParseError,1976,9,/home/daboross/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/../liballoc/string.rs,Enum,pub enum ParseError {}
MATCH ToString,2027,10,/home/daboross/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/../liballoc/string.rs,Trait,pub trait ToString
MATCH Drain,2200,11,/home/daboross/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/../liballoc/string.rs,Struct,pub struct Drain<'a>
$ racer complete std::string::
MATCH String,294,11,/home/zatherz/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/../liballoc/string.rs,Struct,pub struct String
MATCH FromUtf8Error,335,11,/home/zatherz/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/../liballoc/string.rs,Struct,pub struct FromUtf8Error
MATCH FromUtf16Error,360,11,/home/zatherz/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/../liballoc/string.rs,Struct,pub struct FromUtf16Error(());
MATCH ParseError,1976,9,/home/zatherz/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/../liballoc/string.rs,Enum,pub enum ParseError {}
MATCH ToString,2027,10,/home/zatherz/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/../liballoc/string.rs,Trait,pub trait ToString
MATCH Drain,2200,11,/home/zatherz/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/../liballoc/string.rs,Struct,pub struct Drain<'a>
Yea I'm using v0.9.0
MATCH String,294,11,/Users/luis/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src/libstd/../liballoc/string.rs,Struct,pub struct String MATCH FromUtf8Error,335,11,/Users/luis/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src/libstd/../liballoc/string.rs,Struct,pub struct FromUtf8Error MATCH FromUtf16Error,360,11,/Users/luis/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src/libstd/../liballoc/string.rs,Struct,pub struct FromUtf16Error(()); MATCH ParseError,1959,9,/Users/luis/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src/libstd/../liballoc/string.rs,Enum,pub enum ParseError {} MATCH ToString,2010,10,/Users/luis/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src/libstd/../liballoc/string.rs,Trait,pub trait ToString MATCH Drain,2183,11,/Users/luis/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src/libstd/../liballoc/string.rs,Struct,pub struct Drain<'a> MATCH Splice,2254,11,/Users/luis/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src/libstd/../liballoc/string.rs,Struct,pub struct Splice<'a, 'b>
Well, hm. I can't think of anything else that could be the problem.
If rustup
sources and racer
are both working fully correctly, and we all have the same versions of sublime text and RustAutoComplete, it should just work.
Hopefully if anyone with more knowledge of the plugin sees this, the information gathered can at least help a bit.
This is my config file
every time I writing something
I get no hints or suggestions. Is there anything wrong in my config file or that i can add/edit to make this work?