mirror of
https://github.com/boxpositron/absolute-vim.git
synced 2026-02-28 19:50:38 +00:00
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
29 lines
751 B
Lua
29 lines
751 B
Lua
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)
|