nvim-lua icon indicating copy to clipboard operation
nvim-lua copied to clipboard

Matching fzf-lua's preview screen

Open hqkhan opened this issue 3 years ago • 2 comments

Hello! Cool setup overall. I wanted to ask how I can match my fzf-lua's preview window's theme to my current theme. The way mine looks is this:

image

The theme in code is correct but not the left side or where the files populate. How do I get them to match?

hqkhan avatar Jul 30 '22 18:07 hqkhan

Left side colors are controlled by fzf, you can set the highlights using fzf_colors which accepts neovim highlights. man fzf to see all available highlight options as the README fzf_colors doesn’t contain all of them:

COLOR NAMES:
   fg         Text
   bg         Background
   preview-fg Preview window text
   preview-bg Preview window background
   hl         Highlighted substrings
   fg+        Text (current line)
   bg+        Background (current line)
   gutter     Gutter on the left (defaults to bg+)
   hl+        Highlighted substrings (current line)
   query      Query string
   disabled   Query string when search is disabled
   info       Info line (match counters)
   border     Border around the window ([--border](https://www.mankier.com/1/fzf#--border) and [--preview](https://www.mankier.com/1/fzf#--preview))
   prompt     Prompt
   pointer    Pointer to the current line
   marker     Multi-select marker
   spinner    Streaming input indicator
   header     Header

ibhagwan avatar Jul 30 '22 19:07 ibhagwan

Thank you for that. I had two questions.

  1. Devicons -- The size on mine is small compared to yours. Do you know if I can modify that via some config?
  2. I love the way your cursorline looks with the black background on the line you're at. How did you achieve that? I shamefully (xD) took your lua-embark colorscheme but it didn't have the cursor black background. Was wondering if that's just because it's not updated or if there's something special.

hqkhan avatar Jul 31 '22 02:07 hqkhan

Thank you for that. I had two questions.

  1. Devicons -- The size on mine is small compared to yours. Do you know if I can modify that via some config?
  2. I love the way your cursorline looks with the black background on the line you're at. How did you achieve that? I shamefully (xD) took your lua-embark colorscheme but it didn't have the cursor black background. Was wondering if that's just because it's not updated or if there's something special.

Oops I missed this follow up :)

  1. This is font dependent, you’re probably using a monospaced nerd font, use the non-monospaced version for the larger icons.

  2. That’s controlled by fzf_colors, you need to set bg+ to CursorLine: https://github.com/ibhagwan/nvim-lua/blob/6583f809c1c47c5ae6661c050deccd689787b342/lua/plugins/fzf-lua/init.lua#L25-L39

ibhagwan avatar Aug 07 '22 05:08 ibhagwan

Oh no worries at all. #1 makes sense! Yeah I had forgotten to set cursorline in my settings. I'm all good now. Thanks!

hqkhan avatar Aug 07 '22 18:08 hqkhan