update dotfiles
This commit is contained in:
@@ -100,41 +100,8 @@ return {
|
||||
},
|
||||
}
|
||||
|
||||
-- Rust (rust-analyzer)
|
||||
vim.lsp.config['rust_analyzer'] = {
|
||||
cmd = { 'rust-analyzer' }, -- 使用 rustup 的版本,更稳定
|
||||
filetypes = { 'rust' },
|
||||
root_markers = { 'Cargo.toml', '.git' },
|
||||
capabilities = caps,
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
cargo = {
|
||||
allFeatures = true,
|
||||
loadOutDirsFromCheck = true,
|
||||
buildScripts = {
|
||||
enable = true,
|
||||
},
|
||||
},
|
||||
checkOnSave = true,
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
},
|
||||
procMacro = {
|
||||
enable = true,
|
||||
},
|
||||
files = {
|
||||
exclude = {
|
||||
".direnv", ".git", ".jj", ".github", ".gitlab",
|
||||
"bin", "node_modules", "target", "venv", ".venv",
|
||||
},
|
||||
watcher = "client",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- 启用所有 LSP
|
||||
vim.lsp.enable({ 'lua_ls', 'bashls', 'clangd', 'neocmake', 'rust_analyzer' })
|
||||
-- 启用所有 LSP(Rust 由 rustaceanvim 管理)
|
||||
vim.lsp.enable({ 'lua_ls', 'bashls', 'clangd', 'neocmake' })
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user