VidocqH / lsp-lens.nvim

Neovim plugin for displaying references and difinition infos upon functions like JB's IDEA.
MIT License
252 stars 15 forks source link

fix: use `Conceal` instead of `Comment` highlight #6

Closed ofseed closed 11 months ago

ofseed commented 1 year ago

I recommend Conceal instead of Comment as the default color, because in many color schemes, the Comment is set to italic

before image

after image

VidocqH commented 1 year ago

Is Conceal a styleless version of Comment?

ofseed commented 1 year ago

Maybe not, after testing some popular color schemes, I realize it may not very proper.

However, there may be a most suitable highlight, the LspCodeLens, which is built in by nvim-lsp, I just committed the changes.

VidocqH commented 1 year ago

I am not sure but it seems like the highlight group LspCodeLens is not a native highlight group so needs to be explicitly defined by theme and for example, it's not defined by the theme I am using. Maybe we can use pcall('nvim_get_hl_by_name', 'LspCodeLens', 1) == false to check whether this highlight group exists so can decay it to use Comment?

VidocqH commented 1 year ago

I am not sure but it seems like the highlight group LspCodeLens is not a native highlight group so needs to be explicitly defined by theme and for example, it's not defined by the theme I am using. Maybe we can use pcall('nvim_get_hl_by_name', 'LspCodeLens', 1) == false to check whether this highlight group exists so can decay it to use Comment?

@olimorris Do you know this highlight group LspCodeLens? 😊

olimorris commented 1 year ago

I think conceal instead of comment is a sensible suggestion. My colorscheme, nightfox, catppuccin, tokyonight all have no styles applied to conceal. The name of the highlight group is fine imo.