Skip to content

Commit 4377a05

Browse files
authored
Increase priority of signs (#1016)
When severity_sort is enabled, diagnostic sign priority can be raised above 10 (1 per severity). And so by putting it at 21 and 22, dap breakpoints are always shown, even when there are diagnostics (Related to #197 )
1 parent 897c433 commit 4377a05

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lua/dap/breakpoints.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function M.update(breakpoint)
4949
ns,
5050
get_sign_name(bp),
5151
bp.buf,
52-
{ lnum = bp.line; priority = 11; }
52+
{ lnum = bp.line; priority = 21; }
5353
)
5454
end
5555
bp.state.verified = breakpoint.verified
@@ -80,7 +80,7 @@ function M.set_state(bufnr, lnum, state)
8080
ns,
8181
'DapBreakpointRejected',
8282
bufnr,
83-
{ lnum = lnum; priority = 11; }
83+
{ lnum = lnum; priority = 21; }
8484
)
8585
end
8686
end
@@ -121,7 +121,7 @@ function M.toggle(opts, bufnr, lnum)
121121
ns,
122122
sign_name,
123123
bufnr,
124-
{ lnum = lnum; priority = 11; }
124+
{ lnum = lnum; priority = 21; }
125125
)
126126
if sign_id ~= -1 then
127127
bp_by_sign[sign_id] = bp

lua/dap/session.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ local function jump_to_frame(session, frame, preserve_focus_hint, stopped)
558558
return
559559
end
560560
vim.fn.bufload(bufnr)
561-
local ok, failure = pcall(vim.fn.sign_place, 0, session.sign_group, 'DapStopped', bufnr, { lnum = frame.line; priority = 12 })
561+
local ok, failure = pcall(vim.fn.sign_place, 0, session.sign_group, 'DapStopped', bufnr, { lnum = frame.line; priority = 22 })
562562
if not ok then
563563
utils.notify(failure, vim.log.levels.ERROR)
564564
end

0 commit comments

Comments
 (0)