LazyVim-custom/lua/config/keymaps.lua
2024-11-23 22:25:53 +03:00

17 lines
1.2 KiB
Lua

-- Keymaps are automatically loaded on the VeryLazy event
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
-- Add any additional keymaps here
local builtin = require 'telescope.builtin'
local dapui = require 'dapui'
vim.keymap.set("i", "jj", "<Esc>")
vim.keymap.set('n', '<C-p>', builtin.find_files, { desc = '[S]earch [F]iles' })
vim.keymap.set('n', '<leader>dfv', function() dapui.float_element('scopes', { enter = true }) end, { desc = 'Float variables' })
vim.keymap.set('n', '<leader>dfs', function() dapui.float_element('stacks', { enter = true }) end, { desc = 'Float stacks' })
vim.keymap.set('n', '<leader>dfw', function() dapui.float_element('watches', { enter = true }) end, { desc = 'Float watches' })
vim.keymap.set('n', '<leader>dfb', function() dapui.float_element('breakpoints', { enter = true }) end, { desc = 'Float breakpoints' })
vim.keymap.set('n', '<leader>dfd', function() dapui.float_element('repl', { position = "center" }) end, { desc = 'Float debug window' })
vim.keymap.set('n', '<leader>dfc', function() dapui.float_element('console', { position = "center", height = 40, width = 120 }) end, { desc = 'Float console' })