chikko80 / error-lens.nvim

An enhanced visual diagnostic display for Neovim, inspired by the Error Lens extension for Visual Studio Code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug for Multiple diagnostics

fotscode opened this issue · comments

Issue Description

When there's multiple diagnostics the foreground color of the text isn't the proper one, it uses the foreground color of the latest diagnostic applied to the line, instead of the specified at the config file.

Also the spacing of the diagnostic message isn't properly aligned to the width of the color highlighting.

Screenshots

Actual:
image

Expected:
image

Config used

{
    enabled = true,
    auto_adjust = {
        enable = false,
        fallback_bg_color = nil, -- mandatory if enable true (e.g. #281478)
        step = 7,            -- inc: colors should be brighter/darker
        total = 30           -- steps of blender
    },
    prefix = 4,              -- distance code <-> diagnostic message
    -- default colors
    colors = {
        error_fg = "#e06c75", -- diagnostic font color
        error_bg = "#4B252C", -- diagnostic line color
        warn_fg = "#e5c07b",
        warn_bg = "#554400",
        info_fg = "#61afef",
        info_bg = "#00404b",
        hint_fg = "#c678dd",
        hint_bg = "#46285d"
    }
}

Solution

I have found the problem and fixed it, I was just checking if you want this change or not, if you do I could make a pull request and you can merge it.

@fotscode

sure PR is very welcome, thanks!