Open naftulikay opened 5 years ago
Thanks for reporting!
Do you have a specific crate on which I can attempt to reproduce the problem? I tried with a minimal plug.vim configuration containing only Syntastic and LanguageClient, both with signs enabled. But I was not able to reproduce the problem.
I've seen it doing this way too many times to count. I've found that :bd
(completly closing a buffer) can fix things.
My exact Vim setup can be found here.
Simply adding a dependency into Cargo.toml can permabreak a buffer until :bd
closes it entirely. Add serde
or some other dependency, then edit your code to use serde
and it will get into a state where it is convinced that everything is broken. Deleting lines and trying again doesn't seem to fix it.
I also just saw it with a Cargo workspace, I have an additional crate in the workspace named envoy
; I added serde
to its dependencies and it became broken when editing things in the crate. When trying to use the envoy
crate from my main crate, it also broke that buffer: auto-complete saw that the struct was there, but error reporting told me that the struct wasn't found.
Thanks - I'll try.
In the meanwhile, can you try with an another editor using RLS to rule out a problem in RLS/LanguageClient?
It's hard to know exactly what's up but I just installed Atom and ide-rust
which uses RLS under the hood. Completion on std::
works as expected. I added envy
as a dependency in envoy/Cargo.toml
and then attempted to use envy;
in that crate and I get no autocompletion and it's reported as an error.
It may be RLS.
Is there a way for me to debug RLS or see what's working/what's not?
Actually scratch that, I'm unable to reproduce in Atom.
Sounds like RLS. Just a guess, but maybe Atom already reproduced a workaround, which I believe would be to restart RLS when Cargo.toml editing is detected.
Is there a way to restart RLS from NeoVim using rust.vim? I see quite a few RLS processes running for different projects presumably, and I even have one defunct one, somehow it must have gotten unparented and zombified.
master
at this point in time.Additional NeoVim Info
``` NVIM v0.3.1 Build type: Release LuaJIT 2.1.0-beta3 Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-M0l_b5/neovim-0.3.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DDISABLE_LOG -Wdate-time -D_FORTIFY_SOURCE=2 -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -Wno-array-bounds -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim-M0l_b5/neovim-0.3.1/build/config -I/build/neovim-M0l_b5/neovim-0.3.1/src -I/usr/include -I/build/neovim-M0l_b5/neovim-0.3.1/build/src/nvim/auto -I/build/neovim-M0l_b5/neovim-0.3.1/build/include Compiled by team+vim@tracker.debian.org Features: +acl +iconv +jemalloc +tui See ":help feature-compile" system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/share/nvim" Run :checkhealth for more info ```Steps to reproduce:
Expected vs. actual behavior:
Expected
:w
should retrigger the syntax checking.Actual
LanguageClientStop
andLanguageClientStart
does not fix the issue.cargo build
andcargo test
pass without any issues. I have tried:SyntasticReset
and:LanguageClientStop
and:LanguageClientStart
. The only way I have found to reliably fix things is to completely exit and restart NeoVim.Paste debugging info from the Rust Vim plugin via one of the following commands:
:RustInfo
,:RustInfoToClipboard
, or:RustInfoToFile <filename>
.