Update nvim rust config

This commit is contained in:
Shockwave 2024-11-07 20:45:45 +08:00
parent 0ac41e100e
commit 8dd1b2a146
3 changed files with 19 additions and 13 deletions

View File

@ -109,18 +109,18 @@ lspconfig.gopls.setup({
},
})
lspconfig.pyright.setup{
lspconfig.pyright.setup({
on_attach = on_attach,
flags = lsp_flags,
}
})
lspconfig.rust_analyzer.setup{
on_attach = on_attach,
flags = lsp_flags,
settings = {
["rust-analyzer"] = {}
}
}
-- lspconfig.rust_analyzer.setup({
-- on_attach = on_attach,
-- flags = lsp_flags,
-- settings = {
-- ["rust-analyzer"] = {}
-- }
-- })
lspconfig.lua_ls.setup({
on_attach = function(client, bufnr)

View File

@ -59,9 +59,9 @@ if has_cmd("go") then
table.insert(servers, "sqls")
end
if has_cmd("rustc") then
table.insert(servers, "rust_analyzer")
end
-- if has_cmd("rustc") then
-- table.insert(servers, "rust_analyzer")
-- end
vim.g.rustaceanvim = {
@ -92,3 +92,9 @@ mason.setup({
installer.setup({
ensure_installed = servers,
})
installer.setup_handlers({
["rust-analyzer"] = function ()
end
})

View File

@ -8,7 +8,7 @@ export ZSH="$HOME/.config/oh-my-zsh"
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="bracket"
ZSH_THEME="bracket" # set by `omz`
# ZSH_THEME="powerlevel10k/powerlevel10k"
# POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir vcs)
# POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs time virtualenv)