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

rust-analyzer interupts neovim while typing #18434

Closed
vikulikov opened this issue Oct 29, 2024 · 11 comments
Closed

rust-analyzer interupts neovim while typing #18434

vikulikov opened this issue Oct 29, 2024 · 11 comments
Labels
A-third-party-client Broken Window Bugs / technical debt to be addressed immediately C-bug Category: bug

Comments

@vikulikov
Copy link

While typing in neovim rust-analyzer interrupts the editor with the error message
rust_analyzer: -32802: server cancelled the request

Image

rust-analyzer version: rust-analyzer 0.0.0 (3b3a87f 2024-10-27)

rustc version: rustc 1.82.0 (f6e511eec 2024-10-15)

editor or extension: neovim

relevant settings:

 settings = {
                ['rust-analyzer'] = {
                    server = { path = "/opt/homebrew/bin/rust-analyzer" },
                    assist = {
                        importMergeBehavior = "last",
                        importPrefix = "by_self",
                    },
                    files = {
                        excludeDirs = { "target" }
                    },
                    workspace = {
                        symbol = {
                            search = {
                                limit = 3000
                            }
                        }
                    },
                    procMacro = {
                        enable = true
                    },
                    diagnostics = {
                        enable = true,
                        disabled = { "unresolved-proc-macro" },
                        enableExperimental = true,
                    },
                    check = {
                        -- command = "clippy"
                    },
                    cargo = {
                        features = "all",
                        loadOutDirsFromCheck = true,
                    }

                },
            }
@vikulikov vikulikov added the C-bug Category: bug label Oct 29, 2024
@lnicola
Copy link
Member

lnicola commented Oct 29, 2024

I think this is a client issue, it should log those errors, but not pop them up. Which LSP plugin are you using?

@lnicola lnicola added Broken Window Bugs / technical debt to be addressed immediately A-third-party-client labels Oct 29, 2024
@vikulikov
Copy link
Author

Ok, thanks. Will try to figure this on nvim side. I use lspconfig for the configuration and cmp_nvim_lsp for capabilities

@gelfand
Copy link

gelfand commented Oct 30, 2024

Hello, have you fixed it?

@lnicola
Copy link
Member

lnicola commented Oct 30, 2024

You should probably try https://github.com/mrcjkb/rustaceanvim instead.

@gelfand
Copy link

gelfand commented Oct 30, 2024

You should probably try https://github.com/mrcjkb/rustaceanvim instead.

Same issue with it. I'm using it as my setup

@vikulikov
Copy link
Author

vikulikov commented Oct 30, 2024

Hello, have you fixed it?

I've created an issue in neovim repo . @Jesse-Bakker suggested a workaround to ignore this error

@lnicola
Copy link
Member

lnicola commented Oct 30, 2024

Might be worth fixing in rustaceanvim, then.

@lihe6666

This comment has been minimized.

1 similar comment
@Annlix

This comment has been minimized.

@dr-kernel
Copy link

I have this problem as well. Been fighting lots of RA issues lately (seems to be related to config with the latest release). I'm also using rustaceanvim. I reverted to 2024-10-14 and that's fixed the issue. I've tried this one neovim 0.10.0 and 0.10.2_1

@vikulikov
Copy link
Author

I guess this issue can be closed as it is being fixed on the neovim side.
Just duplicating current workaround to configure neovim to ignore such messages. Or rust-analyzer can be downgraded to 2024-10-14 version until next neovim version is released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-third-party-client Broken Window Bugs / technical debt to be addressed immediately C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

6 participants