From 5dc566c4206f383657d67500253559d3be82c421 Mon Sep 17 00:00:00 2001 From: Yi Ming Date: Thu, 22 Jun 2023 19:04:20 +0800 Subject: [PATCH] fix(lsp): do not link `LspInlayHint` to `Comment` directly (#517) * fix(lsp): do not link `LspInlayHint` to `Comment` directly * fix(lsp): remove inlay-hint background color when `transparent_background` is set Co-authored-by: mrtnvgr <48406064+mrtnvgr@users.noreply.github.com> * fix: move comment up --------- Co-authored-by: mrtnvgr <48406064+mrtnvgr@users.noreply.github.com> --- lua/catppuccin/groups/integrations/native_lsp.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/catppuccin/groups/integrations/native_lsp.lua b/lua/catppuccin/groups/integrations/native_lsp.lua index 9d17b03b..c8248e66 100644 --- a/lua/catppuccin/groups/integrations/native_lsp.lua +++ b/lua/catppuccin/groups/integrations/native_lsp.lua @@ -84,7 +84,13 @@ function M.get() LspDiagnosticsUnderlineInformation = { style = underlines.information, sp = info }, -- Used to underline "Information" diagnostics LspDiagnosticsUnderlineHint = { style = underlines.hints, sp = hint }, -- Used to underline "Hint" diagnostics LspCodeLens = { fg = C.overlay0 }, -- virtual text of the codelens - LspInlayHint = { link = "Comment" }, -- virtual text of the inlay hints + LspInlayHint = { + -- fg of `Comment` + fg = C.overlay0, + -- bg of `CursorLine` + bg = O.transparent_background and C.none + or U.vary_color({ latte = U.lighten(C.mantle, 0.70, C.base) }, U.darken(C.surface0, 0.64, C.base)), + }, -- virtual text of the inlay hints LspInfoBorder = { link = "FloatBorder" }, -- LspInfo border } end