brenoprata10 / nvim-highlight-colors

Highlight colors for neovim
654 stars 31 forks source link

'eow' adds highlights everytime the buffer is entered #93

Closed bluss closed 3 months ago

bluss commented 3 months ago

Hi, I just ran across this bug and would rather report it than say nothing.

Plugin version: 656ce9b

With the followng eow configuration, a new inlay is added every time a buffer is entered, so it stacks up and there are more and more color inlays.

bild

(lazy.nvim configuration below)

return {
  "https://github.com/brenoprata10/nvim-highlight-colors",
  cmd = "HighlightColors",
  opts = {
    render = "virtual",
    virtual_symbol = "",
    virtual_symbol_prefix = ' ',
    virtual_symbol_suffix = ' ',
    virtual_symbol_position = 'eow',
  },
  keys = {
    {"<leader>uL", function() require("nvim-highlight-colors").toggle() end, desc = "Highlight Colors (toggle)"},
  },
  config = function(plugin)
    require("nvim-highlight-colors").setup(plugin.opts)
    require("nvim-highlight-colors").turnOff()
  end
}
brenoprata10 commented 3 months ago

Could you check again?

bluss commented 3 months ago

thanks. With that it's half fixed. It doesn't increase anymore, but on first toggle, some places have two inlays (one too much) and some have one.

brenoprata10 commented 3 months ago

Should be fixed now :)