defuz / RustAutoComplete

A SublimeText binding for RACER (Rust auto completion tool)
MIT License
105 stars 20 forks source link

Not working on Windows #18

Closed naveensrinivasan closed 9 years ago

naveensrinivasan commented 9 years ago

I have racer installed and I am able to get code completions on the command line C:\Users\nsrinivasan>racer complete std::io::B MATCH BufReader,323,11,C:\n\rust\src\libstd\io\mem.rs,Struct,pub struct BufReade r<'a> { MATCH BufWriter,253,11,C:\n\rust\src\libstd\io\mem.rs,Struct,pub struct BufWrite r<'a> { MATCH BufferedReader,48,11,C:\n\rust\src\libstd\io\buffered.rs,Struct,pub struct BufferedReader<R> { MATCH BufferedWriter,153,11,C:\n\rust\src\libstd\io\buffered.rs,Struct,pub struc t BufferedWriter<W> { MATCH BufferedStream,339,11,C:\n\rust\src\libstd\io\buffered.rs,Struct,pub struc t BufferedStream<S> { MATCH ByRefReader,868,10,C:\n\rust\src\libstd\io\mod.rs,Trait,pub trait ByRefRea der { MATCH BytesReader,883,10,C:\n\rust\src\libstd\io\mod.rs,Trait,pub trait BytesRea der { MATCH ByRefWriter,1231,10,C:\n\rust\src\libstd\io\mod.rs,Trait,pub trait ByRefWr iter { MATCH Buffer,1372,10,C:\n\rust\src\libstd\io\mod.rs,Trait,pub trait Buffer: Read er { MATCH BufferPrelude,1504,10,C:\n\rust\src\libstd\io\mod.rs,Trait,pub trait Buffe rPrelude { MATCH BrokenPipe,396,4,C:\n\rust\src\libstd\io\mod.rs,EnumVariant,BrokenPipe,

Here is my settings on RustAutoComplete on sublime

{
// 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": [
"c:\n\rust\src"]
}

Any suggestions as to what could be the issue?

denis631 commented 9 years ago

Maybe the path to racer executable is wrong ? Try the absolute path to the racer executable, like: "racer" : "C:\Users\nsrinivasan\racer.exe" or smth like that. Maybe that's the problem :)

naveensrinivasan commented 9 years ago

Thanks.I tried this

"racer": "c:\n\racer\bin\racer.exe",

and also this "racer": "c:\\n\\racer\\bin\\racer.exe",

But either of them didn't help.

denis631 commented 9 years ago

At this moment, you need to find out, whether the path is wrong, or the plugin doesn't work. As far as I know, when you write something in sublime in Rust (in the already existing file, otherwise it doesn't work), it creates a file in that directory, while parsing the rust source files, then deletes that file and autocompletes the code. Try to observe if it works or not. When I had a problem with plugin I thought, that the plugin doesn't work, even though it created the temp file while trying to autocomplete. Then I understood, that the plugin works, but something is wrong, then I got that the path to source files was wrong.

naveensrinivasan commented 9 years ago

Thanks for the info I'll look at that.It works perfectly fine on my Mac. It is only on windows.

naveensrinivasan commented 9 years ago

Figured out the issue. I hadn't installed the Sublime rust package. After I installed that the autocomplete is working.

Thanks