projekt0n / github-nvim-theme

GitHub's Neovim themes
MIT License
2.07k stars 106 forks source link

Support fzf-lua #221

Closed louwers closed 1 year ago

louwers commented 1 year ago

This plugin is a port of the highly popular fzf.vim plugin: https://github.com/ibhagwan/fzf-lua

louwers commented 1 year ago

Something like this can be added to github-nvim-theme:

        -- fzf-lua
        FzfLuaNormal     = { fg = c.fg, bg = cfg.transparent and c.none or c.bg },
        FzfLuaBorder     = { fg = c.border },
        FzfLuaCursor     = { fg = c.bg, bg = c.fg },
        FzfLuaSearch     = { fg = c.syntax.constant, style = Styles.Bold },
        FzfLuaTitle      = { fg = c.blue },
        FzfLuaHelpNormal = { fg = c.fg, bg = cfg.transparent and c.none or c.bg },
        FzfLuaHelpBorder = { fg = c.border },

Full highlight groups that are supported can be found here: https://github.com/ibhagwan/fzf-lua#customizing-highlights

You also need to let the plugin pass the correct colors to fzf. I use this for that:

require 'fzf-lua'.setup {
    fzf_colors = function()
        return {
            ["fg"] = { "fg", "Normal" },
            ["bg"] = { "bg", "Conceal" },
            ["hl"] = { "fg", "TelescopeMatching", "bold" },
            ["hl+"] = { "fg", "TelescopeMatching", "bold" },
            ["fg+"] = { "fg", "Normal" },
            ["bg+"] = { "bg", "TelescopeSelection" },
            ["prompt"] = { "fg", "Normal" },
            ["pointer"] = { "fg", "Normal" },
            ["marker"] = { "fg", "Normal" },
        }
    end
}