gruvbox.nvim icon indicating copy to clipboard operation
gruvbox.nvim copied to clipboard

Highlight on breakpoint when using nvim-dap (debugger) does not reverse the color

Open axel-paillaud opened this issue 1 year ago • 1 comments

Describe the bug When using nvim-dap, set a breakpoint, launch the debugger and reach the breakpoint, the whole line is highlighted with the default gruvbox blue color (light theme on screenshot). The font color is not changed, so the variable name become unreadable.

I don't know how to change this background highlight, Im lost on all the overrides options, and on my setup, :echo synIDattr(synIDtrans(synID(line("."), col("."), 1)), "bg") output nothing.

To Reproduce Steps to reproduce the behavior:

  1. Install and setup correctly nvim-dap, nvim-dap-vscode-js, vscode-js-debug
  2. Set a breakpoint
  3. Launch the debugger
  4. See the "bad" highlight

Expected behavior Background line highlight more light, like the same color when you highlight on visual mode, or reverse font color.

Screenshots

gruvbox-dap-issue

axel-paillaud avatar Oct 15 '23 13:10 axel-paillaud

Edit : After reading this PR , and change my config from

vim.fn.sign_define('DapBreakpoint', {text='🔴', texthl='', linehl='', numhl=''})

to

vim.fn.sign_define('DapBreakpoint', 
    {
        text='🔴', -- nerdfonts icon here
        texthl='DapBreakpointSymbol', 
        linehl='DapBreakpoint', 
        numhl='DapBreakpoint'
    })
vim.fn.sign_define('DapStopped', 
    {
        text='🔴', -- nerdfonts icon here
        texthl='DapStoppedSymbol', 
        linehl='DapBreakpoint', 
        numhl='DapBreakpoint'
    })

This solves the problem, now I have a nice colored breakpoint icon with transparent background, and no highlighted line at all. I suppose it's the texthl key here that match gruvbox value DapBreakpointSymbol ? Still, do you know how to modify the highlighted line where the dap is stopped ?

I'm sorry, I'm really new to neovim and lua, I don't know if open an Issue was a good idea, but maybe it can help someone else ?

axel-paillaud avatar Oct 16 '23 06:10 axel-paillaud