Some nvim rust stuff
This commit is contained in:
parent
065f1ae8bf
commit
bdf63b3651
@ -27,27 +27,31 @@ require('packer').startup(function(use)
|
||||
}
|
||||
|
||||
use {
|
||||
'simrat39/rust-tools.nvim',
|
||||
"mrcjkb/rustaceanvim",
|
||||
ft = { 'rust' },
|
||||
requires = {
|
||||
{ 'neovim/nvim-lspconfig' },
|
||||
|
||||
-- Debugging
|
||||
{ 'nvim-lua/plenary.nvim' },
|
||||
{ 'mfussenegger/nvim-dap' },
|
||||
{
|
||||
"lvimuser/lsp-inlayhints.nvim",
|
||||
opts = {}
|
||||
},
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
{ "mfussenegger/nvim-dap" },
|
||||
},
|
||||
config = function()
|
||||
local rt = require("rust-tools")
|
||||
|
||||
rt.setup({
|
||||
server = {
|
||||
on_attach = function(_, bufnr)
|
||||
-- Hover actions
|
||||
vim.keymap.set("n", "<C-space>", rt.hover_actions.hover_actions, { buffer = bufnr })
|
||||
-- Code action groups
|
||||
vim.keymap.set("n", "<Leader>a", rt.code_action_group.code_action_group, { buffer = bufnr })
|
||||
end,
|
||||
vim.g.rustaceanvim = {
|
||||
tools = {
|
||||
hover_actions = {
|
||||
auto_focus = true,
|
||||
},
|
||||
})
|
||||
},
|
||||
server = {
|
||||
on_attach = function(client, bufnr)
|
||||
require("lsp-inlayhints").setup()
|
||||
require("lsp-inlayhints").on_attach(client, bufnr)
|
||||
require("lsp-inlayhints").show()
|
||||
end
|
||||
}
|
||||
}
|
||||
end,
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user