folke / snacks.nvim

🍿 A collection of small QoL plugins for Neovim
Apache License 2.0
1.31k stars 26 forks source link

feature(dashboard): hide recent_files section title when the list is empty #184

Closed benelan closed 1 day ago

benelan commented 1 day ago

Did you check the docs?

Is your feature request related to a problem? Please describe.

I have the following section in my dashboard config:

{
  title = "Recent Files",
  section = "recent_files",
  cwd = true,
  indent = 2,
},

When I'm in a new project and there are no recent files for the cwd, it would be nice if the title was hidden.

Describe the solution you'd like

Hide the recent_files section's title if the length of the recent files list is 0. I think it makes sense as the default, but it could also be a boolean option.

Describe alternatives you've considered

N/A

Additional context

No response

folke commented 1 day ago

Makes sense. Added!