refactor: extract neovim config
This commit is contained in:
parent
f73b6206cd
commit
35550c6085
45 changed files with 6 additions and 696 deletions
35
neovim/dap.lua
Normal file
35
neovim/dap.lua
Normal file
|
@ -0,0 +1,35 @@
|
|||
local dap = require("dap")
|
||||
local dapui = require("dapui")
|
||||
|
||||
dapui.setup()
|
||||
|
||||
vim.fn.sign_define("DapBreakpoint", { text = "🔴", texthl = "", linehl = "", numhl = "" })
|
||||
|
||||
-- debugging keymaps
|
||||
vim.keymap.set("n", "<F5>", dap.continue, { noremap = true, silent = true })
|
||||
vim.keymap.set("n", "<F9>", dap.toggle_breakpoint, { noremap = true, silent = true })
|
||||
vim.keymap.set("n", "<F10>", dap.step_over, { noremap = true, silent = true })
|
||||
vim.keymap.set("n", "<F11>", dap.step_into, { noremap = true, silent = true })
|
||||
|
||||
vim.keymap.set("n", "<S-F11>", dap.step_out, { noremap = true, silent = true })
|
||||
vim.keymap.set("n", "<F23>", dap.step_out, { noremap = true, silent = true }) -- <Shift-F11> in kitty
|
||||
|
||||
vim.keymap.set("n", "<M-k>", dapui.eval, { noremap = true, silent = true })
|
||||
|
||||
-- trigger auto-completion in repl
|
||||
vim.cmd([[
|
||||
augroup TriggerDapReplAutoCompletion
|
||||
autocmd!
|
||||
autocmd FileType dap-repl lua require("dap.ext.autocompl").attach()
|
||||
augroup END
|
||||
]])
|
||||
|
||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
||||
dapui.open()
|
||||
end
|
||||
dap.listeners.before.event_terminated["dapui_config"] = function()
|
||||
dapui.close()
|
||||
end
|
||||
dap.listeners.before.event_exited["dapui_config"] = function()
|
||||
dapui.close()
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue