neoclide / coc-rls

Rust language server support for coc.nvim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

:CocRestart required?

cdebotton opened this issue · comments

Sorry if this has been asked before, I couldn't find any related issues. I'm using the latest coc.nvim and stable coc-rls, Code completions and suggestions are working, but I don't seem to see updated errors or warnings without invoking :CocRestart. Is this the expected behavior?

Additional info:
nvim 0.3.8
macos

If you added new module to cargo.toml, you have to use :CocRestart for rls work as expected, it's limitation of rls.

@chemzqm Thanks for the quick reply! This is actually not an issue of adding modules to cargo.toml. I'm opening a new project created with cargo new and typing:

fn test() {
    let test_var: u8 = "this is a &str";  
}

And no errors. Running :CocRestart surfaces the expected mismatched type error.

Changing this to:

fn test() {
    let test_var: u8 = 6;
}

Doesn't change any of the error/warning output again until I run :CocRestart, at which point I see the unused variable warning.

Should be problem of rls analyzing your project, checkout :h coc-status for status line integration.

@chemzqm Sorry I should clarify, without invoking :CocRestart, it doesn't seem as though vim is aware of errors at all. They aren't in the status line, but also, the error and warning indicators in the gutter don't become visible until running that command.

I also just realized I'm encountering the same issue with coc-tsserver

Can't reproduce, can you check if :CocList diagnostics have errors?

@chemzqm I was very wrong! The correct diagnostics are displayed there.

I can't find any info that would show why the errors don't surface in my left gutter until I invoke :CocRestart though.

Maybe it's cleared by some of your other vim plugin, try minimal vimrc.