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

Don't respond to LSP requests before startup. #12257

Commits on May 14, 2022

  1. Don't respond to LSP requests before startup.

    A common error found while using emacs + lsp-mode + rust-analyzer is
    that on startup I receive the following logs:
    ```
    LSP :: Error from the Language Server: waiting for cargo metadata or
    cargo check (Unknown error) [4 times]
    ```
    
    This looks similar to rust-lang#10910, and as some people mention, everything
    works well once `cargo metadata` finishes running.
    
    I stumbled accross a [helpful
    comment](https://github.com/rust-lang/rust-analyzer/blob/d382e24a11c8706b201c8437894506d191691334/crates/rust-analyzer/src/main_loop.rs#L567-L568)
    which made me think that it might be worth waiting for startup to
    finish, before attempting to respond to LSP requests.
    rbartlensky committed May 14, 2022
    Copy the full SHA
    e593da1 View commit details
    Browse the repository at this point in the history