akinsho / flutter-tools.nvim

Tools to help create flutter apps in neovim using the native lsp
MIT License
935 stars 75 forks source link

[BUG] Color visualizer not working #301

Closed JPFrancoia closed 8 months ago

JPFrancoia commented 8 months ago

Is there an existing issue for this?

Current Behavior

The square icon doesn't show the actual color.

screen-2023-10-14-12-34-20

screen-2023-10-14-12-36-12

Expected Behavior

The square icon should show the corresponding color

Steps To Reproduce

I just have this configured for the plugin:

lua <<EOF
vim.diagnostic.disable()
require("flutter-tools").setup {
  widget_guides = {
    enabled = true,
  },
  closing_tags = {
    enabled = false
  },
  lsp = {
    color = {
      enabled = true,
      background = false, 
      foreground = false, 
      virtual_text = true, 
      virtual_text_str = "■",
    }
  }
}
EOF

Environment

- OS: Archlinux
- Flutter version: Flutter 3.13.6 • channel stable • https://github.com/flutter/flutter.git
- Is flutter in $PATH: yes
- neovim version: NVIM v0.9.4

Anything else?

There was a similar ticket: https://github.com/akinsho/flutter-tools.nvim/issues/203. I read it and tried the proposed solutions, but it didn't work.

akinsho commented 8 months ago

Seems to work for me without issue but could be down to any number of things. Personally haven't got time to go digging. @sidlatau are you able to see colours in your projects? if so I think we need a more specific root cause there's not enough people around to go digging into stuff like this without more specific root cause issues.

sidlatau commented 8 months ago

I also can not reproduce it, colors are shown for me:

image
JPFrancoia commented 8 months ago

arf :/ I'm happy to run commands and fetch logs, I just have no idea where to find info for this plugin

akinsho commented 8 months ago

@JPFrancoia unfortunately I really just don't have any time to dig in to this at all. I'd suggest maybe starting by looking at your LSP logs. This isn't specific to this plugin and there should be references for this online/maybe help docs about checking nvim's lsp logs. Also I'd try with a minimal init.lua without all your other plugins just inside a dart file with colours and only this plugin and see what happens.

I'm going to close this out since realistically neither @sidlatau or I will have time to walk through your setup and I think it will come down to some specific part of your config or setup. If you find something that indicates a bug in this plugin though not unique to your setup please post back here