new lua style
This commit is contained in:
@ -20,69 +20,15 @@ return {
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
'<F5>',
|
||||
function()
|
||||
require('dap').continue()
|
||||
end,
|
||||
desc = 'DAP start or continue',
|
||||
},
|
||||
{
|
||||
'<S-F5>',
|
||||
function()
|
||||
require('dap').run_last()
|
||||
end,
|
||||
desc = 'DAP run last',
|
||||
},
|
||||
{
|
||||
'<F6>',
|
||||
function()
|
||||
require('dap').run_last()
|
||||
end,
|
||||
desc = 'Run last',
|
||||
},
|
||||
{
|
||||
'<F7>',
|
||||
function()
|
||||
require('dap').goto_()
|
||||
end,
|
||||
desc = 'DAP goto',
|
||||
},
|
||||
{
|
||||
'<F8>',
|
||||
function()
|
||||
require('dap.ui.widgets').hover()
|
||||
end,
|
||||
desc = 'DAP Hover',
|
||||
},
|
||||
{
|
||||
'<F9>',
|
||||
function()
|
||||
require('dap').toggle_breakpoint()
|
||||
end,
|
||||
desc = 'DAP breakpoint',
|
||||
},
|
||||
{
|
||||
'<F10>',
|
||||
function()
|
||||
require('dap').step_over()
|
||||
end,
|
||||
desc = 'DAP step_over',
|
||||
},
|
||||
{
|
||||
'<F11>',
|
||||
function()
|
||||
require('dap').step_into()
|
||||
end,
|
||||
desc = 'DAP step_into',
|
||||
},
|
||||
{
|
||||
'<S-F11>',
|
||||
function()
|
||||
require('dap').step_out()
|
||||
end,
|
||||
desc = 'DAP step_out',
|
||||
},
|
||||
{ '<F5>', function() require('dap').continue() end, desc = 'DAP start or continue' },
|
||||
{ '<S-F5>', function() require('dap').run_last() end, desc = 'DAP run last' },
|
||||
{ '<F6>', function() require('dap').run_last() end, desc = 'Run last' },
|
||||
{ '<F7>', function() require('dap').goto_() end, desc = 'DAP goto' },
|
||||
{ '<F8>', function() require('dap.ui.widgets').hover() end, desc = 'DAP Hover' },
|
||||
{ '<F9>', function() require('dap').toggle_breakpoint() end, desc = 'DAP breakpoint' },
|
||||
{ '<F10>', function() require('dap').step_over() end, desc = 'DAP step_over' },
|
||||
{ '<F11>', function() require('dap').step_into() end, desc = 'DAP step_into' },
|
||||
{ '<S-F11>', function() require('dap').step_out() end, desc = 'DAP step_out' },
|
||||
},
|
||||
config = function()
|
||||
local dap = require('dap')
|
||||
@ -112,18 +58,10 @@ return {
|
||||
|
||||
local dapui = require('dapui')
|
||||
dapui.setup()
|
||||
dap.listeners.before.attach.dapui_config = function()
|
||||
dapui.open()
|
||||
end
|
||||
dap.listeners.before.launch.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
|
||||
dap.listeners.before.attach.dapui_config = function() dapui.open() end
|
||||
dap.listeners.before.launch.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 = require('mason-registry').get_package('debugpy'):get_install_path()
|
||||
if vim.loop.os_uname().sysname:find('Windows') then
|
||||
@ -168,9 +106,7 @@ return {
|
||||
name = 'Launch codelldb',
|
||||
type = 'codelldb',
|
||||
request = 'launch',
|
||||
program = function()
|
||||
return vim.fn.input({ 'Path to executable: ', vim.fn.getcwd() .. '/build_nvim/', 'file' })
|
||||
end,
|
||||
program = function() return vim.fn.input({ 'Path to executable: ', vim.fn.getcwd() .. '/build_nvim/', 'file' }) end,
|
||||
cwd = '${workspaceFolder}',
|
||||
stopOnEntry = false,
|
||||
},
|
||||
@ -178,9 +114,7 @@ return {
|
||||
name = 'Launch lldb',
|
||||
type = 'lldb',
|
||||
request = 'launch',
|
||||
program = function()
|
||||
return vim.fn.input({ 'Path to executable: ', vim.fn.getcwd() .. '/build_nvim', 'file' })
|
||||
end,
|
||||
program = function() return vim.fn.input({ 'Path to executable: ', vim.fn.getcwd() .. '/build_nvim', 'file' }) end,
|
||||
cwd = '${workspaceFolder}',
|
||||
stopOnEntry = false,
|
||||
args = {},
|
||||
|
Reference in New Issue
Block a user