diff options
| author | 2026-04-17 10:53:20 +0100 | |
|---|---|---|
| committer | 2026-04-17 10:53:20 +0100 | |
| commit | e01f1d6f5d42fac643facecd9ca2d240d53453bd (patch) | |
| tree | 6684173cbd992e4c0b5fa2002b9a6082f866ca51 /home/.config/nvim/lua/plugins/debug.lua | |
| parent | dd2bc0a81d7ca6de60a509d8ff1a669e13785f01 (diff) | |
| download | dotfiles-e01f1d6f5d42fac643facecd9ca2d240d53453bd.tar.gz dotfiles-e01f1d6f5d42fac643facecd9ca2d240d53453bd.tar.bz2 dotfiles-e01f1d6f5d42fac643facecd9ca2d240d53453bd.zip | |
feat: migrate from lazy.nvim to vim.pack
Replace lazy.nvim plugin manager with Neovim 0.12's native vim.pack API.
All plugin config files rewritten from lazy.nvim spec tables to imperative
require/setup format with explicit vim.keymap.set() calls.
Key changes:
- vim.pack.add() with ~53 plugins in init.lua
- blink.cmp/pairs/download pinned to version tags (vim.version.range)
- PackChanged autocmd for markdown-preview build hook
- Ordered requires: colorscheme → ui → treesitter → completion → lsp → rest
- Plugin setup guards (gitsigns, which-key, blink.cmp) handle deferred
plugin/ file loading correctly
Net reduction: ~438 lines across 13 files.
Diffstat (limited to 'home/.config/nvim/lua/plugins/debug.lua')
| -rw-r--r-- | home/.config/nvim/lua/plugins/debug.lua | 160 |
1 files changed, 67 insertions, 93 deletions
diff --git a/home/.config/nvim/lua/plugins/debug.lua b/home/.config/nvim/lua/plugins/debug.lua index b47dd63..bef0d1c 100644 --- a/home/.config/nvim/lua/plugins/debug.lua +++ b/home/.config/nvim/lua/plugins/debug.lua @@ -1,101 +1,75 @@ -return { - { - "miroshQa/debugmaster.nvim", - branch = "dashboard", - dependencies = "mfussenegger/nvim-dap", - keys = { - { - "<leader>td", - function() - require("debugmaster").mode.toggle() - end, - desc = "[T]oggle [D]ebug mode", - }, - }, - }, - { - "mfussenegger/nvim-dap", - config = function() - local dap = require("dap") +vim.keymap.set("n", "<leader>td", function() + require("debugmaster").mode.toggle() +end, { desc = "[T]oggle [D]ebug mode" }) - local function get_env_vars() - local variables = vim.fn.environ() - table.insert(variables, { ASAN_OPTIONS = "detect_leaks=0" }) - return variables - end +local dap = require("dap") - dap.adapters.lldb = { - type = "executable", - command = "lldb-dap", - name = "lldb", - env = get_env_vars, - } - dap.adapters.gdb = { - type = "executable", - command = "gdb", - args = { "--interpreter=dap" }, - env = get_env_vars, - } - dap.adapters.codelldb = { - type = "executable", - command = "codelldb", - env = get_env_vars, - } +local function get_env_vars() + local variables = vim.fn.environ() + table.insert(variables, { ASAN_OPTIONS = "detect_leaks=0" }) + return variables +end - local function get_program() - local _program - vim.ui.input({ - prompt = "Program: ", - complete = "file_in_path", - }, function(res) - _program = res - end) - return vim.fn.system("which " .. _program):gsub("\n$", "") - end +dap.adapters.lldb = { + type = "executable", + command = "lldb-dap", + name = "lldb", + env = get_env_vars, +} +dap.adapters.gdb = { + type = "executable", + command = "gdb", + args = { "--interpreter=dap" }, + env = get_env_vars, +} +dap.adapters.codelldb = { + type = "executable", + command = "codelldb", + env = get_env_vars, +} - local function get_args() - local _args - vim.ui.input({ - prompt = "Args: ", - default = vim.fn.getreg("+"), - complete = "file", - }, function(res) - _args = res - end) - return require("dap.utils").splitstr(_args) - end +local function get_program() + local _program + vim.ui.input({ + prompt = "Program: ", + complete = "file_in_path", + }, function(res) + _program = res + end) + return vim.fn.system("which " .. _program):gsub("\n$", "") +end - dap.configurations.cpp = { - { - name = "codelldb Launch", - type = "codelldb", - request = "launch", - cwd = "${workspaceFolder}", - program = get_program, - args = get_args, - stopOnEntry = true, - console = "integratedTerminal", - }, - } +local function get_args() + local _args + vim.ui.input({ + prompt = "Args: ", + default = vim.fn.getreg("+"), + complete = "file", + }, function(res) + _args = res + end) + return require("dap.utils").splitstr(_args) +end - dap.configurations.c = dap.configurations.cpp - dap.configurations.rust = dap.configurations.cpp - end, - dependencies = { - { - "theHamsta/nvim-dap-virtual-text", - opts = {}, - dependencies = { "nvim-treesitter/nvim-treesitter" }, - }, - "williamboman/mason.nvim", - { - "jay-babu/mason-nvim-dap.nvim", - opts = { - automatic_installation = false, - handlers = {}, - ensure_installed = {}, - }, - }, - }, +dap.configurations.cpp = { + { + name = "codelldb Launch", + type = "codelldb", + request = "launch", + cwd = "${workspaceFolder}", + program = get_program, + args = get_args, + stopOnEntry = true, + console = "integratedTerminal", }, } + +dap.configurations.c = dap.configurations.cpp +dap.configurations.rust = dap.configurations.cpp + +require("nvim-dap-virtual-text").setup({}) +require("mason-nvim-dap").setup({ + automatic_installation = false, + handlers = {}, + ensure_installed = {}, +}) |
