kitchen sink again :(
This commit is contained in:
@ -1,50 +1,50 @@
|
||||
local misc = require('core.misc')
|
||||
local misc = require("core.misc")
|
||||
local map = misc.map
|
||||
|
||||
return { 'mfussenegger/nvim-dap',
|
||||
return { "mfussenegger/nvim-dap",
|
||||
requires = {
|
||||
'williamboman/mason.nvim',
|
||||
'nvim-telescope/telescope.nvim',
|
||||
"williamboman/mason.nvim",
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
disable = not vim.fn.has("nvim-0.8.0"),
|
||||
branch = '0.8.0',
|
||||
branch = "0.8.0",
|
||||
function()
|
||||
|
||||
local dap = require("dap")
|
||||
|
||||
local codelldb_port = 13000
|
||||
dap.adapters.codelldb = {
|
||||
type = 'server',
|
||||
host = '127.0.0.1',
|
||||
type = "server",
|
||||
host = "127.0.0.1",
|
||||
port = codelldb_port,
|
||||
executable = {
|
||||
command = require('mason-registry').get_package('codelldb'):get_install_path()..'/codelldb',
|
||||
args = { '--port', codelldb_port }
|
||||
command = require("mason-registry").get_package("codelldb"):get_install_path().."/codelldb",
|
||||
args = { "--port", codelldb_port }
|
||||
}
|
||||
}
|
||||
|
||||
dap.configurations.c = {
|
||||
{
|
||||
name = 'LLDB: Launch',
|
||||
type = 'codelldb',
|
||||
request = 'launch',
|
||||
name = "LLDB: Launch",
|
||||
type = "codelldb",
|
||||
request = "launch",
|
||||
program = function()
|
||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd()..'/', 'file')
|
||||
return vim.fn.input("Path to executable: ", vim.fn.getcwd().."/", "file")
|
||||
end,
|
||||
cwd = '${workspaceFolder}',
|
||||
cwd = "${workspaceFolder}",
|
||||
stopOnEntry = false,
|
||||
args = {},
|
||||
console = 'integratedTerminal'
|
||||
console = "integratedTerminal"
|
||||
}
|
||||
}
|
||||
|
||||
map('n', '<Leader>ec', dap.continue, { desc = "dap continue " })
|
||||
map('n', '<Leader>el', dap.run_last, { desc = "dap run last" })
|
||||
map('n', '<Leader>et', dap.terminate, { desc = "dap terminate " })
|
||||
map('n', '<Leader>eb', require("dap.breakpoints").toggle, { desc = "dap toggle breakpoint" })
|
||||
map('n', '<Leader>e]', dap.step_over, { desc = "dap step over" })
|
||||
map('n', '<Leader>e[', dap.step_back, { desc = "dap step back" })
|
||||
map('n', '<Leader>er', dap.repl.toggle, { desc = "dap repl toggle" })
|
||||
map('n', '<Leader>eR', dap.restart, { desc = "dap restart" })
|
||||
map("n", "<Leader>ec", dap.continue, { desc = "dap continue " })
|
||||
map("n", "<Leader>el", dap.run_last, { desc = "dap run last" })
|
||||
map("n", "<Leader>et", dap.terminate, { desc = "dap terminate " })
|
||||
map("n", "<Leader>eb", require("dap.breakpoints").toggle, { desc = "dap toggle breakpoint" })
|
||||
map("n", "<Leader>e]", dap.step_over, { desc = "dap step over" })
|
||||
map("n", "<Leader>e[", dap.step_back, { desc = "dap step back" })
|
||||
map("n", "<Leader>er", dap.repl.toggle, { desc = "dap repl toggle" })
|
||||
map("n", "<Leader>eR", dap.restart, { desc = "dap restart" })
|
||||
end
|
||||
}
|
||||
|
Reference in New Issue
Block a user