-
Notifications
You must be signed in to change notification settings - Fork 173
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
Making fzf window more "prettier" #760
Comments
@RayZ0rrm, the highlights you posted are the neovim part of the customization, while I'm not sure if you can get to the exact look and feel as the one you linked you can probably get close, read The only thing I think you cannot do rn is the zero spacing between the main fzf window and the preview window when using the default ("builtin") previwer, however, if you use |
@ibhagwan thank you for the quick response as always. I'll look into fzf_colors. I see that you have set it up in your nvim config. But it seems to be dependent on your colorscheme. Let me look into it more. |
You can always use |
@RayZ0rr, when you're done if you don't mind please share your customization, I'd love to see what you made of it :-) |
@ibhagwan I don't think I was capable of reproducing telescope's design. I am currently using the one from my dots, specifically here It looks like this in the terminal (wezterm) And like this in nvim The only problem is the help window with green background which seems not that clear Except for that I really like the current look and it feels more refreshing to use fzf ❤️ |
Looks great, ty @RayZ0rr :) |
Here's the settings I use to achieve something similar to what's shown in the first comment. Hope this helps! Relevant
|
Looks amazing @0xcharly! |
@0xcharly, I’m thinking it might be worthwhile to add a new border style with the same “fat” characters so this would be made possible without having to use a custom colorscheme, something akin to the fzf-lua/lua/fzf-lua/defaults.lua Lines 76 to 82 in 7aff4a3
Would love to create a profile that demonstrates this style that can work with or without a custom colorscheme. |
other changes includes: - 2 new border styles `thiccc` and `thicccc` - refactored acquiring hexcolor from hl group - fixed fzf_colors hls that link to default colormaps - commit command formatting in defaults.lua
Update and try |
`borderless` profile empty scrollbar set to transparent bg
ty @0xcharly for the comments!
Unlike the
I tried it and it seems Thankfully, it's very easy to set customization overrides, like this: :lua require"fzf-lua".setup({"borderless",winopts={hl={scrollfloat_e="PmenuThumb"}}}) Try this for an empty background, also interesting: :lua require"fzf-lua".setup({"borderless",winopts={hl={scrollfloat_e=""}}})
Fixed in 3115ed3. One more thing, this part in your config: -- Disable icons, improve performances drastically.
local noicon = {
git_icons = false,
file_icons = false,
color_icons = false,
}
opts['btags'] = noicon
opts['buffers'] = noicon
... Can be reduced to: global_git_icons = false,
global_file_icons = false, |
@0xcharly, I forgot to mention one more thing, the current profile defines the border as an array of empty strings which adds padding around the main terminal window, it's worth noting that if you set :lua require"fzf-lua".setup({"borderless",winopts={border="none"}}) |
@RayZ0rr, I was able to achieve something very similar to what you're after with the addition of the title to the main window, modified
local function title(str)
return {
winopts = {
-- passthrough options to main window's `nvim_open_win`
title = { { " " .. str .. " ", "IncSearch" } },
title_pos = "center",
}
}
local hls = {
bg = "PmenuSbar",
sel = "PmenuSel",
}
end
require("fzf-lua").setup {
global_git_icons = false,
global_file_icons = false,
winopts = {
border = { " ", " ", " ", " ", " ", " ", " ", " " },
preview = {
scrollbar = "float",
scrolloff = "-2",
title_align = "center",
},
hl = {
title = "IncSearch",
border = hls.bg,
preview_border = hls.bg,
scrollfloat_e = "",
scrollfloat_f = hls.sel,
},
},
fzf_colors = {
["gutter"] = { "bg", hls.bg },
["bg"] = { "bg", hls.bg },
["bg+"] = { "bg", hls.sel },
["fg+"] = { "fg", hls.sel },
},
files = title("Find Files"),
grep = title("Search"),
} |
Fair enough, I haven't tested with other themes, but was just looking for something that would make sense from a highlight naming convention point of view. I guess
Yeah, same comment as above, it makes sense to use something that looks good out of the box over something that is more semantically correct. Even though it's a bit of a shame, presets do need to work out of the box to be relevant.
Yeah, thanks for the flexibility here. I'm going to keep my config as-is anyway, since I like where I landed. The only thing that I'll change is to use blanks for border characters. Working great now:
Thanks for the quick fix!
I had noticed that from the profile's configs and promptly updated mine to take advantage of that! Much cleaner. |
I did try that to begin with, but I personally prefer the look of the window with the extra padding. Thanks for the pointer though, might be useful for someone else that lands on this issue. |
The new profile attempts to mimic the borderless Telescope profile with centered window titles.
Ok final update to this (hopefully 😄), new "quickstart" profile Left most of terminal fzf's colors as default, probably room for improvement via Tysm @0xcharly for opening my eyes to the new design, your final setup looks amazing! |
The new profile attempts to mimic the borderless Telescope profile with centered window titles.
The new profile attempts to mimic the borderless Telescope profile with centered window titles.
My pleasure! And thank you for all the work on this issue, for all the commits you've sent since yesterday, and in general for bringing |
That’s controlled by fzf (the binary, not Fzf-lua), I’m not aware of any option to keep the left side pinned, you can use
Currently no but it’s probably not a bad idea to shorten the path or use only the filename, I’ll add it to the feature list. |
Additional changes: - README updates + Added table of contents + Added `lazy.nvim` instructions + highlights section reword - Renamed option: `winopts.preview.title_align` -> `title_pos` (non-breaking, backward compatible, matches `nvim_open_win`) - Preview title position default set to `center` - Preview title displays filename tail only (#760) (customizable via `previewers.builtin.title_fnamemodify`) - Updated `borderless` and Telescope profiles with new hls
Additional changes: - README updates + Added table of contents + Added `lazy.nvim` instructions + highlights section reword - Renamed option: `winopts.preview.title_align` -> `title_pos` (non-breaking, backward compatible, matches `nvim_open_win`) - Preview title position default set to `center` - Preview title displays filename tail only (#760) (customizable via `previewers.builtin.title_fnamemodify`) - Updated `borderless` and Telescope profiles with new hls
@GreenSleeper, def made more sense to have just the filename, this commit makes it the default (customizable). |
Additional changes: - README updates + Added table of contents + Added `lazy.nvim` instructions + highlights section reword - Renamed option: `winopts.preview.title_align` -> `title_pos` (non-breaking, backward compatible, matches `nvim_open_win`) - Preview title position default set to `center` - Preview title displays filename tail only (#760) (customizable via `previewers.builtin.title_fnamemodify`) - Updated `borderless` and Telescope profiles with new hls
|
This error isn’t from Fzf-lua, looks like the |
I can reproduce the issue on my end. It seems to be due to the |
Oh, I see that our messages crossed: 6171eee |
Yap, should be ok now, I forgot the README to vimdoc plugin already generates a @GreenSleeper update to b1ee200 and the message should disappear. |
I can confirm that 6171eee fixed the issue. Thanks for the quick fix! |
Fair, I guess the CI was fast enough! |
Sorry if this is a stupid question but I am trying to customize the way that fzf looks.
My goal is something similar to olimorris/onedarkpro.nvim#31 (which is for telescope but I want to see if I can achieve something similar to fzf.
My current one looks like this:
I have created a config file based on Conscious
The text was updated successfully, but these errors were encountered: