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

Focused node highlight not working properly for golang #83

Open
waynerv opened this issue Sep 5, 2023 · 1 comment
Open

Focused node highlight not working properly for golang #83

waynerv opened this issue Sep 5, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@waynerv
Copy link

waynerv commented Sep 5, 2023

image image

I am using gopls as LSP to write Go code. One common issue I encounter is that when I iterate through the fields of a struct, the focus node in both the preview window and the original window loses its foreground color (figure.1).

However, some fields are displayed correctly with highlight color(figure.2). To resolve this, I have to disable the highlight feature in the source_buffer option.

@waynerv waynerv changed the title Focused node of gopls struct do not display fg Focused node highlight not working properly for golang Sep 8, 2023
@waynerv
Copy link
Author

waynerv commented Sep 8, 2023

After some research, I found that in many cases the background color of NavbuddyName is lost (more precisely, it use the background color of NavbuddyScope instead), but the foreground color still works. Don't know how all this happens.

vim.api.nvim_set_hl(0, "NavbuddyScope", { bg = "#223249" })
vim.api.nvim_set_hl(0, "NavbuddyName", { fg = "#DCD7BA", bg = "#FFA066" })

expect:
image
losing bg:
image

@SmiteshP SmiteshP added the bug Something isn't working label Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants