maxmx03 / fluoromachine.nvim

Synthwave x Fluoromachine port for Neovim
MIT License
227 stars 12 forks source link

Override search text bg color #18

Closed qbnil closed 6 months ago

qbnil commented 6 months ago

Is there any way to set a custom bg color for when you perform a search in neovim (fluoromachine theme). Right now it's only the fg which is cyan. It constantly overlays with other cyan-colored letters. Needs to be changed

maxmx03 commented 6 months ago

Yes, here an example

local fm = require 'fluoromachine'

fm.setup {
    overrides = function (c)
        return {
           ['IncSearch'] = { bg = c.alt_bg }, -- or other color
           -- ['IncSearch'] = { reverse = true }, -- maybe this helps
        }
    end
}

vim.cmd.colorscheme 'fluoromachine'
qbnil commented 6 months ago

Appreciate your time and help, managed to make it work, awesome theme btw, keep up the good work

qbnil commented 6 months ago

image I'm sorry i had to reopen this, overriding inc search overrides it here as well, but i don't want it behave the same way it does when i just search for words, these are completions which should have no bg color, there should be a paramater name i don't know of yet, can you help me on that and also provide the source where you take that information so that i don't bother you later on every matter

maxmx03 commented 6 months ago

Some highlight groups, such as CmpItemAbbrMatch, CmpItemAbbrMatchFuzzy, and TelescopeMatching, are linked to the IncSearch, you can use telescope command :Telescope highlights to search for more highlight groups that are linked to IncSearch.

I dont which are you talking about, but u can override or remove the highlight group from linking to IncSearch like this:

return {
   CmpItemAbbrMatch = { fg = 'NONE', bg = 'NONE' },
   CmpItemAbbrMatchFuzzy = {}  -- maybe this works as well
}

I plan to update the entire colorscheme eventually, but I don't have the time to do so right now.

qbnil commented 6 months ago

Gotcha, the first worked while the second didnt, it still gives me some inc search behaviour sometimes tho but i can put up with it right now i think, thx for your help image