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

No behaviour. #58

Closed
Ploppz opened this issue Aug 17, 2016 · 9 comments
Closed

No behaviour. #58

Ploppz opened this issue Aug 17, 2016 · 9 comments

Comments

@Ploppz
Copy link

Ploppz commented Aug 17, 2016

I'm in linux using nvim 0.1.4.

I cloned racer into ~/work/rust/lib, and ran cargo build.
In my vimrc:

Plug 'racer-rust/vim-racer'
set hidden
let g:racer_cmd='/home/ploppz/work/rust/lib/racer/target/debug/racer'
let $RUST_SRC_PATH='/home/ploppz/work/rust/lib/racer/src/'

But the plugin doesn't work. There's no useful completion, and hotkeys like gd don't do anything. It worked earlier. What changed since then is just that I cloned and built the racer repository anew.
(edit: this is ~/work/rust/lib/racer)

@Shougo
Copy link
Contributor

Shougo commented Aug 17, 2016

Please test if your racer works.
And you should ask the proper check method in racer repository
racer-rust/racer#591

@guingois
Copy link

Not sure if related but I sometimes get the same absence of behavior.

racer itself works fine on my setup. I followed the standard installation process and I can successfully use it with the command-line. As far as vim-racer is concerned, I've observed (with both nvim and vim) that:

When I open a Rust file directly, the plugin works fine. For example, nvim main.rs allows me to benefit from the plugin completion and hotkeys.

When I open a Rust file indirectly, the plugin does not work at all. For example, nvim, followed by the editor command :e main.rs, does not activate any of the plugin behavior.

This holds when I combine the two. For example:

  1. nvim foo.rs => plugin OK.
  2. :edit bar.rs => plugin KO.
  3. :buffer # => plugin OK.

I hope it helps.

@Shougo
Copy link
Contributor

Shougo commented Jan 16, 2017

You should check the buffer filetype.
I think it is not rust.

@simon-whitehead
Copy link

I also have this problem and can replicate it the same way @erwanthomas does.

Running: vim src/main.rs - everything works.
Running: vim . and using say, NERDTree to open the file - nothing works.

I ran this in both scenarios:

echo &filetype

Both of them return rust. Not sure how to proceed.

@guingois
Copy link

I've checked with a fresh Ubuntu install, installing only the bare minimum to run racer, vim and vim-racer.
Same results, and like @simon-whitehead, filetype is rust.

@Shougo
Copy link
Contributor

Shougo commented Jan 19, 2017

Hm. OK. It should be fixed.
It is vim-racer bug.

@Shougo
Copy link
Contributor

Shougo commented Jan 20, 2017

Please test the fix.
#77

@guingois
Copy link

Using your fix, I cannot replicate the problem anymore and the plugin works well. Thanks!

@Shougo Shougo closed this as completed in cf62b03 Jan 23, 2017
Shougo added a commit that referenced this issue Jan 23, 2017
Fix #58 use ftplugin instead of plugin
@Shougo
Copy link
Contributor

Shougo commented Jan 23, 2017

Fixed.

ncarter100 pushed a commit to ncarter100/vim-racer that referenced this issue Apr 16, 2017
Update the readme to reflect

commit cf62b03 ("Fix racer-rust#58 use ftplugin instead of plugin")
ncarter100 pushed a commit to ncarter100/vim-racer that referenced this issue Apr 16, 2017
Update the readme to reflect

commit cf62b03 ("Fix racer-rust#58 use ftplugin instead of plugin")
ncarter100 added a commit to ncarter100/vim-racer that referenced this issue Apr 16, 2017
    Update the readme to reflect

    commit cf62b03 ("Fix racer-rust#58 use ftplugin instead of plugin")
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

4 participants