Too many open files #219
-
I've decided to ask first before posting as a bug as I might be doing something wrong. I'm having this error:
When it happened I had only 3 buffers with rust files and only 2 visible in splits. Checkhealth reports everything is fine. This is the project I'm opening: https://github.com/wireapp/core-crypto Here's my config: {
tools = {
reload_workspace_from_cargo_toml = true,
},
server = {
on_attach = function(client, bufnr)
if client.server_capabilities.documentSymbolProvider then
require('nvim-navic').attach(client, bufnr)
end
require('setup.autocommand').lsp_autocmds(client, bufnr)
-- enable inlay hints if server supports it
if client.server_capabilities.inlayHintProvider then
vim.lsp.inlay_hint.enable(bufnr, true)
end
end,
capabilities = function()
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
-- workaround until neovim supports multiple client encodings
capabilities = vim.tbl_deep_extend('force', capabilities, {
offsetEncoding = { 'utf-16' },
general = {
positionEncodings = { 'utf-16' },
},
})
return capabilities
end,
standalone = false,
settings = {
['rust-analyzer'] = {
diagnostics = {
enable = true,
enableExperimental = true,
},
completion = {
autoself = { enable = true },
autoimport = { enable = true },
postfix = { enable = true },
},
imports = {
group = { enable = true },
merge = { glob = false },
prefix = 'self',
granularity = {
enforce = true,
group = 'crate',
},
},
cargo = {
loadOutDirsFromCheck = true,
autoreload = true,
runBuildScripts = true,
features = 'all',
-- https://github.com/rust-lang/rust-analyzer/issues/13400
target = 'aarch64-apple-darwin',
},
procMacro = {
enable = true,
attributes = { enable = true },
},
lens = {
enable = true,
run = { enable = true },
debug = { enable = true },
implementations = { enable = true },
references = {
adt = { enable = true },
enumVariant = { enable = true },
method = { enable = true },
trait = { enable = true },
},
},
hover = {
actions = {
enable = true,
run = { enable = true },
debug = { enable = true },
gotoTypeDef = { enable = true },
implementations = { enable = true },
references = { enable = true },
},
links = { enable = true },
documentation = { enable = true },
},
inlayHints = {
enable = true,
bindingModeHints = { enable = true },
chainingHints = { enable = true },
closingBraceHints = {
enable = true,
minLines = 0,
},
closureReturnTypeHints = { enable = 'always' },
lifetimeElisionHints = { enable = 'skip_trivial' },
typeHints = { enable = true },
implicitDrops = { enable = true },
},
checkOnSave = {
enable = true,
-- https://github.com/rust-analyzer/rust-analyzer/issues/9768
command = 'clippy',
features = 'all',
allTargets = true,
},
},
},
},
} My full config: https://github.com/augustocdias/dotfiles/tree/main/.config/nvim |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey 👋 The stack trace tells me it's happening when rustaceanvim calls Not sure why that is throwing Or, you can workaround it by disabling source map genertion with the |
Beta Was this translation helpful? Give feedback.
Yes, it only affects debugging.