Skip to content

Commit

Permalink
fix: resolve cursor line background transparency issue
Browse files Browse the repository at this point in the history
  • Loading branch information
rachartier committed Jan 29, 2025
1 parent 59b81b4 commit 5ceb573
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ require("tiny-inline-diagnostic").setup({
-- "ghost", "simple", "nonerdfont", "amongus"
preset = "modern",

transparent_bg = false, -- Set the background of the diagnostic to transparent

hi = {
error = "DiagnosticError", -- Highlight group for error messages
warn = "DiagnosticWarn", -- Highlight group for warning messages
Expand Down
2 changes: 1 addition & 1 deletion lua/tiny-inline-diagnostic/highlights.lua
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ local function create_highlight_groups(colors, blends, transparent)
for severity, name in pairs(SEVERITY_NAMES) do
-- Cursor line highlights
hi[HIGHLIGHT_PREFIX .. name .. "CursorLine"] = {
bg = transparent and "None" or colors.background,
bg = colors.background,
fg = colors[string.lower(name)].fg,
italic = colors[string.lower(name)].italic,
}
Expand Down
1 change: 1 addition & 0 deletions lua/tiny-inline-diagnostic/presets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ function M.build(name, transparent_bg)
if transparent_bg then
preset.signs.left = ""
preset.signs.right = ""
preset.blend.factor = 0
end

return preset
Expand Down

0 comments on commit 5ceb573

Please sign in to comment.