Fix stylua formatting
This commit is contained in:
parent
74ed652b10
commit
d5dc915d69
|
|
@ -44,9 +44,7 @@ return {
|
||||||
local buf_bps = require('dap.breakpoints').get(vim.fn.bufnr())[vim.fn.bufnr()]
|
local buf_bps = require('dap.breakpoints').get(vim.fn.bufnr())[vim.fn.bufnr()]
|
||||||
---@type dap.SourceBreakpoint
|
---@type dap.SourceBreakpoint
|
||||||
for _, candidate in ipairs(buf_bps) do
|
for _, candidate in ipairs(buf_bps) do
|
||||||
if candidate.line and candidate.line == vim.fn.line '.' then
|
if candidate.line and candidate.line == vim.fn.line '.' then return candidate end
|
||||||
return candidate
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return { condition = '', logMessage = '', hitCondition = '', line = vim.fn.line '.' }
|
return { condition = '', logMessage = '', hitCondition = '', line = vim.fn.line '.' }
|
||||||
|
|
@ -58,21 +56,15 @@ return {
|
||||||
local props = {
|
local props = {
|
||||||
['Condition'] = {
|
['Condition'] = {
|
||||||
value = bp.condition,
|
value = bp.condition,
|
||||||
setter = function(v)
|
setter = function(v) bp.condition = v end,
|
||||||
bp.condition = v
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
['Hit Condition'] = {
|
['Hit Condition'] = {
|
||||||
value = bp.hitCondition,
|
value = bp.hitCondition,
|
||||||
setter = function(v)
|
setter = function(v) bp.hitCondition = v end,
|
||||||
bp.hitCondition = v
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
['Log Message'] = {
|
['Log Message'] = {
|
||||||
value = bp.logMessage,
|
value = bp.logMessage,
|
||||||
setter = function(v)
|
setter = function(v) bp.logMessage = v end,
|
||||||
bp.logMessage = v
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
local menu_options = {}
|
local menu_options = {}
|
||||||
|
|
@ -81,9 +73,7 @@ return {
|
||||||
end
|
end
|
||||||
vim.ui.select(menu_options, {
|
vim.ui.select(menu_options, {
|
||||||
prompt = 'Edit Breakpoint',
|
prompt = 'Edit Breakpoint',
|
||||||
format_item = function(item)
|
format_item = function(item) return ('%s: %s'):format(item, props[item].value) end,
|
||||||
return ('%s: %s'):format(item, props[item].value)
|
|
||||||
end,
|
|
||||||
}, function(choice)
|
}, function(choice)
|
||||||
if choice == nil then
|
if choice == nil then
|
||||||
-- User cancelled the selection
|
-- User cancelled the selection
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue