Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(hl): Add new FzfLuaPreviewBorder highlight #778

Closed
wants to merge 1 commit into from

Conversation

mikesmithgh
Copy link
Contributor

I'd like to add an additional highlight group FzfLuaPreviewBorder. I have different background colors for the fzf window and preview window. This allows me to customize the border on each differently to match the corresponding background color.

Without the highlight group:
fzf-lua-without-hl

With the highlight group:
fzf-lua-with-hl

Please let me know what you think.

@ibhagwan ibhagwan closed this in 0a4245f Jun 11, 2023
@ibhagwan
Copy link
Owner

Merged, tysm for the contribution @mikesmithgh!

@nyngwang
Copy link
Contributor

I tried hi FzfLuaPreviewBorder guibg=red guifg=red but I didn't see any change.

@ibhagwan
Copy link
Owner

74da5c5

FYI , the above commit also adds FzfLuaPreviewNormal to make it more consistent and not have to use winopts.preview.winopts to set the previewer window highlights.

I tried hi FzfLuaPreviewBorder guibg=red guifg=red but I didn't see any change.

@nyngwang, checking.

ibhagwan added a commit that referenced this pull request Jun 11, 2023
@ibhagwan
Copy link
Owner

@nyngwang, try a2dcd45, just tested with:

:hi! link FzfLuaPreviewNormal NvimInternalError

@nyngwang
Copy link
Contributor

nyngwang commented Jun 11, 2023

@ibhagwan Now it works. I just tested the same command and the color can be changed dynamically :) Thank you!

@nyngwang
Copy link
Contributor

nyngwang commented Jun 11, 2023

@ibhagwan I found that the same problem occurs on FzfLuaTabTitle:

  1. No effect, if using :FzfLua tabs to call it.
  2. Cannot be changed after Neovim has been started, if using :lua require('fzf-lua').tabs with tab_title being overridden:
    vim.keymap.set('n', '<C-b>', function () require('fzf-lua').tabs {
      tab_title = {
        function (tab_idx, is_current)
        end,
        'FzfLuaTabTitle',
      },
    } end)

@ibhagwan
Copy link
Owner

@nyngwang, there is no FzfLuaTabTitle highlight in the code, if this is a different issue related to the customization of tab highlights let's open a new issue for this?

@nyngwang
Copy link
Contributor

You're right. I just realized that it is my custom highlight group for the titles of :FzfLua tabs.

@nyngwang
Copy link
Contributor

nyngwang commented Jun 11, 2023

@ibhagwan 6b1f32d seems to break it, i.e. the highlight groups FzfLuaPreviewBorder, FzfLuaBorder, FzfLuaTitle set by my colorscheme are all ignored.

@ibhagwan
Copy link
Owner

ibhagwan commented Jun 11, 2023

@ibhagwan 6b1f32d seems to break it, i.e. the highlight groups FzfLuaPreviewBorder, FzfLuaBorder, FzfLuaTitle set by my colorscheme are all ignored.

@nyngwang, update to 2803904, should work again unless you're using neovim 0.8.x.

@nyngwang
Copy link
Contributor

Confirmed, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants