diff --git a/lua/lspconfig/server_configurations/rust_analyzer.lua b/lua/lspconfig/server_configurations/rust_analyzer.lua index dd70c61862..978fdcd7d2 100644 --- a/lua/lspconfig/server_configurations/rust_analyzer.lua +++ b/lua/lspconfig/server_configurations/rust_analyzer.lua @@ -44,6 +44,7 @@ return { default_config = { cmd = { 'rust-analyzer' }, filetypes = { 'rust' }, + single_file_support = true, root_dir = function(fname) local reuse_active = is_library(fname) if reuse_active then