1
0
Fork 0

Update dot_config/nvim/lua/plugins/nvim-rust-tools.lua

This commit is contained in:
Florian RICHER 2022-09-03 15:39:51 +02:00
parent 98adb407d5
commit b120a8062a

View file

@ -3,10 +3,6 @@ local opts = {
-- Automatically set inlay hints (type hints)
autoSetHints = true,
-- Whether to show hover actions inside the hover window
-- This overrides the default hover handler
hover_with_actions = true,
-- how to execute terminal commands
-- options right now: termopen / quickfix
executor = require("rust-tools/executors").termopen,
@ -98,7 +94,15 @@ local opts = {
-- all the opts to send to nvim-lspconfig
-- these override the defaults set by rust-tools.nvim
-- see https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#rust_analyzer
server = {}, -- rust-analyer options
-- rust-analyer options
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,
},
-- debugging stuff
dap = {
@ -116,4 +120,4 @@ end
return {
init = init
}
}