akinsho / flutter-tools.nvim

Tools to help create flutter apps in neovim using the native lsp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] FlutterWidgetGuides highlight group gets overwritten on entering dart file

hrideshmg opened this issue · comments

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

If the highlight group FlutterWidgetGuides is set through vim.api.nvim_set_hl() in (init.lua), it gets overwritten when opening a dart file to instead use the colors from the Normal group.

Expected Behavior

The FlutterWidgetGuides highlight group retains the custom colors set in (init.lua).

Steps To Reproduce

N/A

Environment

- OS: Arch linux
- Flutter version: 3.16.6-1
- Is flutter in $PATH: yes
- neovim version: v0.9.5

Anything else?

I'm not sure if this is the correct way to override the highlight group but i was unable to find any alternative way, I've got it to work by setting up an autocmd on BuffEnter but it feels like a hacky way to do it.

If possible i would like to work on this issue by either adding a config parameter for the widget guide color or doing a check for the highlight group already being set. This is my first issue on GitHub, and I would appreciate guidance on the best approach.