mirror of
https://github.com/boxpositron/absolute-vim.git
synced 2026-02-28 11:40:36 +00:00
feat(dap.lua): add configuration for dap and dap-ui plugins to enable debugging features in Neovim
feat(lsp-config.lua): configure python lsp using pylsp to provide language server capabilities for Python files refactor(magma.lua): remove magma plugin configuration as it is no longer used feat(mason.lua): add configuration for mason and mason-nvim-dap plugins to enable package management and debugging features in Neovim refactor(init.lua): set maplocalleader to "\\" for easier keybindings refactor(remap.lua): remove setting mapleader to " " as it is no longer needed, add keybinding for toggling file explorer using NvimTreeToggle command
This commit is contained in:
28
lua/absolute/after/dap.lua
Normal file
28
lua/absolute/after/dap.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
local dap = require("dap")
|
||||
local dapui = require("dapui")
|
||||
local dap_python = require("dap-python")
|
||||
|
||||
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
|
||||
|
||||
|
||||
local path = "~/.local/share/nvim/mason/packages/debugpy/venv/bin/python"
|
||||
dap_python.setup(path)
|
||||
|
||||
-- Setup Mappings
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
opts.desc = "Toggle breakpoint"
|
||||
vim.keymap.set("n", "<leader>db", "<cmd> DapToggleBreakpoint<CR>", opts)
|
||||
|
||||
opts.desc = "Debug Python Run"
|
||||
vim.keymap.set("n", "<leader>dpr", function()
|
||||
dap_python.test_method()
|
||||
end, opts)
|
||||
Reference in New Issue
Block a user