You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My color scheme defines one color for Normal and a different color for SignColumn.
When simply placing a breakpoint, it uses background color of the editor pane (Normal) rather than sign column (SignColumn) color.
See example below (note background around symbol B):
Expected Result
It would make sense for the breakpoint and other nvim-dap signs to use the background of SignColumn by default.
Actual Result
Color used for breakpoint signs matches Normal color of the scheme.
I can work around it by setting the matching color for SignColumn through configuration for DapBreakpoint, DapStopped and etc. but it's not ideal and would break every time the color schema is changed.
The text was updated successfully, but these errors were encountered:
If anyone needs also, for the current code, here is a workaround that reads current color for SignColumn and reuses it. This has to be applied before color scheme is loaded for the first time (or you can reload the color scheme if plugin is lazy loaded for example and this snippet is only executed at some later point):
vim.api.nvim_create_autocmd("ColorScheme", {
pattern="*",
desc="Prevent colorscheme clearing self-defined DAP marker colors",
callback=function()
-- Reuse current SignColumn background (except for DapStoppedLine)localsign_column_hl=vim.api.nvim_get_hl(0, { name='SignColumn' })
-- if bg or ctermbg aren't found, use bg = 'bg' (which means current Normal) and ctermbg = 'Black'-- convert to 6 digit hex value starting with #localsign_column_bg= (sign_column_hl.bg~=nil) and ('#%06x'):format(sign_column_hl.bg) or'bg'localsign_column_ctermbg= (sign_column_hl.ctermbg~=nil) andsign_column_hl.ctermbgor'Black'vim.api.nvim_set_hl(0, 'DapStopped', { fg='#00ff00', bg=sign_column_bg, ctermbg=sign_column_ctermbg })
vim.api.nvim_set_hl(0, 'DapStoppedLine', { bg='#2e4d3d', ctermbg='Green' })
vim.api.nvim_set_hl(0, 'DapBreakpoint', { fg='#c23127', bg=sign_column_bg, ctermbg=sign_column_ctermbg })
vim.api.nvim_set_hl(0, 'DapBreakpointRejected', { fg='#888ca6', bg=sign_column_bg, ctermbg=sign_column_ctermbg })
vim.api.nvim_set_hl(0, 'DapLogPoint', { fg='#61afef', bg=sign_column_bg, ctermbg=sign_column_ctermbg })
end
})
-- reload current color scheme to pick up colors override if it was set up in a lazy plugin definition fashionvim.cmd.colorscheme(vim.g.colors_name)
Steps to Reproduce
My color scheme defines one color for Normal and a different color for SignColumn.
When simply placing a breakpoint, it uses background color of the editor pane (
Normal
) rather than sign column (SignColumn
) color.See example below (note background around symbol B):
Expected Result
It would make sense for the breakpoint and other nvim-dap signs to use the background of
SignColumn
by default.Actual Result
Color used for breakpoint signs matches
Normal
color of the scheme.I can work around it by setting the matching color for
SignColumn
through configuration forDapBreakpoint
,DapStopped
and etc. but it's not ideal and would break every time the color schema is changed.The text was updated successfully, but these errors were encountered: