Compare commits

..

No commits in common. "c671f7042399117753066a5caefbda6551db6d88" and "62f92944dc6b9afd3c89307eb3ea42c67fb95ad0" have entirely different histories.

2 changed files with 6 additions and 19 deletions

View File

@ -1,17 +1,6 @@
local M = {} local M = {}
M.setup = function() M.setup = function()
-- HACK: See https://github.com/neovim/neovim/issues/30985#issuecomment-2447329525
-- This fixes an issue with "server cancelled the request" emissions from `rust-analyzer`
for _, method in ipairs({ "textDocument/diagnostic", "workspace/diagnostic" }) do
local default_diagnostic_handler = vim.lsp.handlers[method]
vim.lsp.handlers[method] = function(error, result, ctx, config)
if error ~= nil and error.code == -32802 then
return
end
return default_diagnostic_handler(error, result, ctx, config)
end
end
vim.diagnostic.config({ vim.diagnostic.config({
severity_sort = true, severity_sort = true,
underline = true, underline = true,

View File

@ -110,19 +110,17 @@ return {
default_settings = { default_settings = {
["rust-analyzer"] = { ["rust-analyzer"] = {
cargo = { cargo = {
features = "all", allFeatures = true,
loadOutDirsFromCheck = true, loadOutDirsFromCheck = true,
runBuildScripts = true, runBuildScripts = true,
}, },
check = { checkOnSave = {
allFeatures = true,
allTargets = true,
command = "clippy", command = "clippy",
features = "all",
}, },
checkOnSave = true, procMacro = {
rustfmt = { enable = true,
rangeFormatting = {
enable = true,
},
}, },
}, },
}, },