basic hardcoded debugging
This commit is contained in:
@@ -41,6 +41,7 @@ require("lazy").setup({
|
||||
{ import = "plugins.coding" },
|
||||
{ import = "plugins.colors" },
|
||||
{ import = "plugins.ui" },
|
||||
{ import = "plugins.debugging" },
|
||||
},
|
||||
install = { colorscheme = { "habamax" } },
|
||||
checker = { enabled = true },
|
||||
@@ -53,3 +54,22 @@ require("notify").setup({
|
||||
background_colour = "#000000",
|
||||
})
|
||||
|
||||
local dap = require('dap')
|
||||
dap.adapters.codelldb = {
|
||||
type = "executable",
|
||||
command = "/Users/caiowakamatsu/install/codelldb/extension/adapter/codelldb",
|
||||
}
|
||||
|
||||
local dap = require('dap')
|
||||
dap.configurations.cpp = {
|
||||
{
|
||||
type = 'codelldb';
|
||||
request = 'launch';
|
||||
name = "Launch file";
|
||||
program = "build/source/cfi_app";
|
||||
},
|
||||
}
|
||||
|
||||
vim.api.nvim_create_user_command("Debug", function(opts)
|
||||
|
||||
end,)
|
||||
|
||||
57
nvim/lua/plugins/debugging.lua
Normal file
57
nvim/lua/plugins/debugging.lua
Normal file
@@ -0,0 +1,57 @@
|
||||
return {
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
keys = {
|
||||
{
|
||||
"<leader>db",
|
||||
function() require("dap").toggle_breakpoint() end,
|
||||
desc = "Toggle Breakpoint"
|
||||
},
|
||||
|
||||
{
|
||||
"<leader>dc",
|
||||
function() require("dap").continue() end,
|
||||
desc = "Continue"
|
||||
},
|
||||
|
||||
{
|
||||
"<leader>dC",
|
||||
function() require("dap").run_to_cursor() end,
|
||||
desc = "Run to Cursor"
|
||||
},
|
||||
|
||||
{
|
||||
"<leader>dT",
|
||||
function() require("dap").terminate() end,
|
||||
desc = "Terminate"
|
||||
},
|
||||
}
|
||||
},
|
||||
{
|
||||
"jay-babu/mason-nvim-dap.nvim",
|
||||
---@type MasonNvimDapSettings
|
||||
opts = {
|
||||
-- This line is essential to making automatic installation work
|
||||
-- :exploding-brain
|
||||
handlers = {},
|
||||
automatic_installation = {
|
||||
-- These will be configured by separate plugins.
|
||||
exclude = {
|
||||
"delve",
|
||||
"python",
|
||||
},
|
||||
},
|
||||
-- DAP servers: Mason will be invoked to install these if necessary.
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"codelldb",
|
||||
"php",
|
||||
"python",
|
||||
},
|
||||
},
|
||||
dependencies = {
|
||||
"mfussenegger/nvim-dap",
|
||||
"williamboman/mason.nvim",
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user