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

Add option to use more subtle highlight for LspReference{Read/Write/Text} #345

Merged
merged 2 commits into from
Oct 6, 2024

Conversation

DefinitelyNotSimon13
Copy link

The way the LspReference{Read/Write/Text} highlights currently look are in my opinion to imposing and distracting:
Currently with catppuccin

Furthermore - at least for catppuccin - this is also not how the originial catppuccin theme looks.

When setting ui.base64.subtle_hover = true the used colors are changed:

local nvconfig = require "nvconfig"
local subtle_hover = nvconfig.ui.subtle_hover or nvconfig.base46.subtle_hover

local lspReferenceText, lspReferenceRead, lspReferenceWrite

if subtle_hover then
  lspReferenceText = { bg = colors.grey }
  lspReferenceRead = { bg = colors.grey }
  lspReferenceWrite = { bg = colors.grey }
else
  lspReferenceText = { fg = colors.darker_black, bg = colors.white }
  lspReferenceRead = { fg = colors.darker_black, bg = colors.white }
  lspReferenceWrite = { fg = colors.darker_black, bg = colors.white }
end

return {
  -- LSP References
  LspReferenceText = lspReferenceText,
  LspReferenceRead = lspReferenceRead,
  LspReferenceWrite = lspReferenceWrite,
  [...]
}

This results in the hovered/related elements looking like this:
Hovering with "subtle_hover enabled"

I've also created a draft pull request to add this option to nvconfig.lua file.

@siduck
Copy link
Member

siduck commented Oct 6, 2024

why subtle_hover?

I like this style, keep it default. Users not liking it can just use hl_override
image

@siduck
Copy link
Member

siduck commented Oct 6, 2024

image

just make them into -> bg=one_b3

@DefinitelyNotSimon13
Copy link
Author

why subtle_hover?

I like this style, keep it default. Users not liking it can just use hl_override
image

Wasn't sure if the original setting was as it is on purpose - changed it to always be one_b3

@siduck siduck merged commit 235add7 into NvChad:v2.5 Oct 6, 2024
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 this pull request may close these issues.

2 participants