feat: add rust-tools plugin

main
mandlm 2022-04-08 08:03:34 +02:00
parent f42e3c31b5
commit 5abe595986
Signed by: mandlm
GPG Key ID: 4AA25D647AA54CC7
2 changed files with 12 additions and 1 deletions

View File

@ -193,6 +193,9 @@ return require('packer').startup(function(use)
-- automatic pairs
use({"Raimondi/delimitMate"})
-- rust tools
use({"simrat39/rust-tools.nvim", requires = {{"neovim/nvim-lspconfig"}}})
-- markdown preview
use({'iamcco/markdown-preview.nvim'})

View File

@ -142,5 +142,13 @@ lsp_installer.on_server_ready(function(server)
extra_server_opts[server.name](opts)
end
server:setup(opts)
if server.name == "rust_analyzer" then
require("rust-tools").setup({
server = vim.tbl_deep_extend("force", server:get_default_options(),
opts)
})
server:attach_buffers()
else
server:setup(opts)
end
end)