Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
axel-paillaud opened this issue Oct 15, 2023 · 1 comment

Comments

@axel-paillaud
Copy link

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
Copy link
Author

axel-paillaud commented Oct 16, 2023

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant