Bohdan's terminal configuration

nvim: C++ debugger

bpavuk.neocities.org ee85c2db eb444bc9

verified
Changed files
+48 -10
nvim
.config
nvim
lua
configs
plugins
+22
nvim/.config/nvim/lua/configs/dap.lua
···
··· 1 + local dap = require("dap") 2 + 3 + dap.adapters.lldb = { 4 + type = "executable", 5 + command = "lldb-dap", 6 + name = "lldb", 7 + } 8 + 9 + dap.configurations.cpp = { 10 + { 11 + name = 'Launch', 12 + type = 'lldb', 13 + request = 'launch', 14 + program = function() 15 + return vim.fn.input('Tell me the executable path: ', vim.fn.getcwd() .. '/', 'file') 16 + end, 17 + cwd = '${workspaceFolder}', 18 + stopOnEntry = false, 19 + args = {}, 20 + } 21 + } 22 +
+16 -10
nvim/.config/nvim/lua/mappings.lua
··· 8 this = require "telescope", 9 } 10 local dap = require "dap" 11 12 map("n", ";", ":", { desc = "CMD enter command mode" }) 13 map("i", "jk", "<ESC>") ··· 17 18 -- tmux 19 20 - map("n", "<C-h>", ":TmuxNavigateLeft<cr>") 21 - map("n", "<C-j>", ":TmuxNavigateDown<cr>") 22 - map("n", "<C-k>", ":TmuxNavigateUp<cr>") 23 - map("n", "<C-l>", ":TmuxNavigateRight<cr>") 24 - map("n", "<C-\\>", ":TmuxNavigatePrevious<cr>") 25 26 -- DAP 27 map("n", "<leader>dba", function() 28 dap.toggle_breakpoint() 29 - end, { desc = "Toggle breakpoint" }) 30 map("n", "<leader>dbc", function() 31 dap.continue() 32 - end, { desc = "Continue debugging" }) 33 map("n", "<leader>dbso", function() 34 dap.step_over() 35 - end, { desc = "Step over" }) 36 map("n", "<leader>dbsi", function() 37 dap.step_into() 38 - end, { desc = "Step into" }) 39 map("n", "<leader>dbsO", function() 40 dap.step_out() 41 - end, { desc = "Step out" }) 42 43 -- LSP 44 map("n", "<leader>fe", function()
··· 8 this = require "telescope", 9 } 10 local dap = require "dap" 11 + local dap_ui = require "dapui" 12 13 map("n", ";", ":", { desc = "CMD enter command mode" }) 14 map("i", "jk", "<ESC>") ··· 18 19 -- tmux 20 21 + -- map("n", "<C-h>", ":TmuxNavigateLeft<cr>") 22 + -- map("n", "<C-j>", ":TmuxNavigateDown<cr>") 23 + -- map("n", "<C-k>", ":TmuxNavigateUp<cr>") 24 + -- map("n", "<C-l>", ":TmuxNavigateRight<cr>") 25 + -- map("n", "<C-\\>", ":TmuxNavigatePrevious<cr>") 26 27 -- DAP 28 map("n", "<leader>dba", function() 29 dap.toggle_breakpoint() 30 + end, { desc = "DAP: Toggle breakpoint" }) 31 map("n", "<leader>dbc", function() 32 dap.continue() 33 + end, { desc = "DAP: Continue" }) 34 map("n", "<leader>dbso", function() 35 dap.step_over() 36 + end, { desc = "DAP: Step over" }) 37 map("n", "<leader>dbsi", function() 38 dap.step_into() 39 + end, { desc = "DAP: Step into" }) 40 map("n", "<leader>dbsO", function() 41 dap.step_out() 42 + end, { desc = "DAP: Step out" }) 43 + map("n", "<leader>dbx", ":DapNew<cr>", { desc = "DAP: Start debugger" }) 44 + 45 + map("n", "<leader>dbt", function() 46 + dap_ui.toggle() 47 + end, { desc = "DAP: Toggle UI" }) 48 49 -- LSP 50 map("n", "<leader>fe", function()
+6
nvim/.config/nvim/lua/plugins/c.lua
···
··· 1 + return { 2 + { 3 + 'Civitasv/cmake-tools.nvim', 4 + opts = {} 5 + } 6 + }
+4
nvim/.config/nvim/lua/plugins/dap.lua
··· 1 return { 2 { 3 "mfussenegger/nvim-dap", 4 }, 5 { 6 "rcarriga/nvim-dap-ui", ··· 10 }, 11 config = function() 12 require "configs.dap_ui" 13 end, 14 }, 15 }
··· 1 return { 2 { 3 "mfussenegger/nvim-dap", 4 + config = function() 5 + require "configs.dap" 6 + end 7 }, 8 { 9 "rcarriga/nvim-dap-ui", ··· 13 }, 14 config = function() 15 require "configs.dap_ui" 16 + 17 end, 18 }, 19 }