mrshmllow / document-color.nvim

🌈 LSP-based colorizer for neovim
MIT License
159 stars 3 forks source link

Colors just flare up briefly and then disappear again #2

Open stefanwatt opened 2 years ago

stefanwatt commented 2 years ago

Title says it all.

Expected: Background of tailwind color classes stays colorized in the appropriate color.

Actual: Background returns to default background color after a couple ms.

mrshmllow commented 2 years ago

that's very strange. do you have any other tailwind colorizer installed?

mrshmllow commented 2 years ago

do they come back if you start editing the file

stefanwatt commented 2 years ago

that's very strange. do you have any other tailwind colorizer installed?

I don't use multiple in parallel if that's what you mean. I have tried others, tho. With the same result.

do they come back if you start editing the file

Yes, but only if I edit the text of the color class. Not if I just edit anything.

mrshmllow commented 2 years ago

I can't reproduce this.. some kind of screen recording or something would help. its probably conflicting with something

stefanwatt commented 2 years ago

https://gfycat.com/simpleadmiredbellsnake

mrshmllow commented 2 years ago

unfortunately you might just have to go and disable all other plugins until it works

stefanwatt commented 2 years ago

Disabled everything except for keymaps and LSP stuff (which obviously I need for tailwind). Issue persists.

mrshmllow commented 2 years ago

what version neovim are you using

stefanwatt commented 2 years ago

0.7.2

mrshmllow commented 2 years ago

try latest git because thats where I tested everything

mrshmllow commented 2 years ago

It works fine for me on 0.7.2

celsobenedetti commented 2 years ago

I encountered something similar, the Tailwindcss LS worked fine, but in .css files with cssls, the colors would show when entering the buffer, but if i moved the cursor around they would disappear.

I found that disabling "xiyaowong/nvim-transparent" fixed the problem for me, i would guess it is something related to opacity or highlight groups

stefanwatt commented 2 years ago

I don't use that plugin and I already disabled all plugins that aren't absolutely necessary.

mrshmllow commented 2 years ago

Okay, i have been able to reproduce this issue. Are you passing

capabilities.textDocument.colorProvider = {
  dynamicRegistration = true
}

to your lsp servers like the readme?

fitrh commented 1 year ago

@mrshmllow yes, I set colorProvider.dynamicRegistration = true and I can reproduce this issue with tailwindcss LSP, but I don't face this issue when using themaxmarchuk/tailwindcss-colors.nvim