nvim-pack / nvim-spectre

Find the enemy and replace them with dark power.
MIT License
2.04k stars 70 forks source link

colors are gone when you change the colorscheme #196

Closed dprophete closed 9 months ago

dprophete commented 10 months ago

spectre works as expected when I start nvim.

image

But if I ever change my colorscheme (say to switch to a light colorscheme), then the colors are gone:

image

(and switching back to the previous colorscheme doesn't help either:

image

)

I am using:

NVIM v0.9.0-dev-805+g9166116c6-dirty
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by didier@didier-m1-mbp.local

Features: +acl +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/HEAD-9166116/share/nvim"

Run :checkhealth for more info

on max os sonoma 14.1.2 (23B92) and with the latest nvim-spectre (commit a18a580)

abilkhan024 commented 9 months ago

Hi, I have almost the same setup, and encountaring this bug, did you find any workaround?

UPD: Workaround for me was adding highligh options in setup function Full setup looks like this

require("spectre").setup({
    is_insert_mode = true,
    is_close = true,
    is_block_ui_break = true,
    highlight = {
        ui = "String",
        search = "DiffChange",
        replace = "DiffDelete",
    },
})