rust debugging better

This commit is contained in:
Tyrel Souza 2023-05-28 13:35:08 -04:00
parent eb32c2194a
commit f5bd270655
No known key found for this signature in database
GPG Key ID: F3614B02ACBE438E
2 changed files with 16 additions and 0 deletions

View File

@ -97,4 +97,19 @@ return function(use)
-- use({'airblade/vim-rooter'}) -- use({'airblade/vim-rooter'})
-- Debugging
use 'mfussenegger/nvim-dap'
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,
},
})
end end

View File

@ -120,6 +120,7 @@ vim.api.nvim_set_keymap("n", "<C-K>", ":bnext<CR>", {silent = true})
vim.api.nvim_set_keymap("n", "<C-o>", ":NERDTreeToggle<CR>", {silent = true}) vim.api.nvim_set_keymap("n", "<C-o>", ":NERDTreeToggle<CR>", {silent = true})
vim.api.nvim_set_keymap("n", "<F1>", ":set invnumber invrelativenumber<CR>", {silent = true }) vim.api.nvim_set_keymap("n", "<F1>", ":set invnumber invrelativenumber<CR>", {silent = true })
vim.api.nvim_set_keymap("i", "<F1>", "<Esc>", {silent = true })
vim.api.nvim_set_keymap("n", "<F2>",":SearchSession<CR>", {silent = true }) vim.api.nvim_set_keymap("n", "<F2>",":SearchSession<CR>", {silent = true })
vim.api.nvim_set_keymap("n", "<F8>", ":Tagbar<CR>", {silent = true }) vim.api.nvim_set_keymap("n", "<F8>", ":Tagbar<CR>", {silent = true })