Skip to content
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

auto_complete_triggers not working #41

Open
luisfernrg opened this issue Mar 28, 2017 · 12 comments
Open

auto_complete_triggers not working #41

luisfernrg opened this issue Mar 28, 2017 · 12 comments

Comments

@luisfernrg
Copy link

This is my config file

{
	// The full path to the racer binary. If racer is already
	// in your system path, then this default will be fine.
	"racer": "/Users/luis/.cargo/bin/racer",

	// A list of search paths. This should generally just
	// be the path to the rust compiler src/ directory.
	"search_paths": [
	  "/Users/luis/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src"
	]
}

every time I writing something

use std::

I get no hints or suggestions. Is there anything wrong in my config file or that i can add/edit to make this work?

@daboross
Copy link

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.

@luisfernrg
Copy link
Author

@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?

@daboross
Copy link

{
    // 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.

@luisfernrg
Copy link
Author

@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?

@zatherz
Copy link

zatherz commented Nov 23, 2017

Bump

@daboross
Copy link

daboross commented Nov 24, 2017

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.

screenshot from 2017-11-24 00-01-50

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?

@luisfernrg
Copy link
Author

luisfernrg commented Nov 24, 2017

@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

@zatherz
Copy link

zatherz commented Nov 25, 2017

I'm on Linux, Arch Linux to be more specific. Racer 2.0.12, Rust 1.21.0.

@daboross
Copy link

daboross commented Nov 25, 2017

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>

@zatherz
Copy link

zatherz commented Nov 25, 2017

$ 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>

@luisfernrg
Copy link
Author

luisfernrg commented Nov 25, 2017

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>

@daboross
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants