Update dot_config/nvim/lua/plugins/nvim-rust-tools.lua
This commit is contained in:
parent
98adb407d5
commit
b120a8062a
1 changed files with 10 additions and 6 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue