This plugin version: f9c8c8ad4135346a945e1ebfb00b723976d92dfc
I'm using some LSP client:
Related Vim LSP client: nvim_lsp
Steps to reproduce given the above info
open a new code file let's say a.rs, and run Vista finder nvim_lsp, this will give the right output.
open another code file let's say b.rs, and run Vista finder nvim_lsp, this will give the output same with a.rs, and it's not the correct output of b.rs.
keep on b.rs and run another time Vista finder nvim_lsp, this time will give the correct output of b.rs.
after first file, every new file will give the stale output of first run Vista finder nvim_lsp and second run is correct.
Expected behavior
Every run of Vista finder nvim_lsp will give the right output.
open crates/matcher/src/substring.rs and run Vista finder nvim_lsp
open crates/matcher/src/mod.rs and run Vista finder nvim_lsp
keep on crates/matcher/src/mod.rs and run another time Vista finder nvim_lsp
Potential root cause
Every time a new file is opened and run Vista finder nvim_lsp, cache will be empty so a vista#executive#nvim_lsp#Run and then s:Run will be call.
I think it's designed to call s:RunAsync() and wait for at least the data has been written or we can say vista#executive#nvim_lsp#SetData has been call.
But g:vista_executive_nvim_lsp_fetching is not reset to true in s:Run before call s:RunAsync(), so from second time we call s:Run, it will not be blocked to wait for s:RunAsync finish, so the s:data in nvim_lsp.vim will be stale.
If you agree with the potential bug I found, I can send a pr to fix it. Looking forward to your response. Thank you.
Describe the bug From second time run
Vista finder nvim_lsp
in a new file will give the stale output which is the result of last file.Environment:
Steps to reproduce given the above info
a.rs
, and runVista finder nvim_lsp
, this will give the right output.b.rs
, and runVista finder nvim_lsp
, this will give the output same witha.rs
, and it's not the correct output ofb.rs
.b.rs
and run another timeVista finder nvim_lsp
, this time will give the correct output ofb.rs
.Vista finder nvim_lsp
and second run is correct.Expected behavior Every run of
Vista finder nvim_lsp
will give the right output.Screenshot or gif (if possible) Run on https://github.com/liuchengxu/vim-clap
crates/matcher/src/substring.rs
and runVista finder nvim_lsp
crates/matcher/src/mod.rs
and runVista finder nvim_lsp
crates/matcher/src/mod.rs
and run another timeVista finder nvim_lsp
Potential root cause
Vista finder nvim_lsp
, cache will be empty so avista#executive#nvim_lsp#Run
and thens:Run
will be call.s:RunAsync()
and wait for at least the data has been written or we can sayvista#executive#nvim_lsp#SetData
has been call.g:vista_executive_nvim_lsp_fetching
is not reset totrue
ins:Run
beforecall s:RunAsync()
, so from second time we calls:Run
, it will not be blocked to wait fors:RunAsync
finish, so thes:data
innvim_lsp.vim
will be stale.If you agree with the potential bug I found, I can send a pr to fix it. Looking forward to your response. Thank you.