nvimdev / dashboard-nvim

vim dashboard
MIT License
2.3k stars 187 forks source link

Have an empty center for doom theme #328

Closed AlphabetsAlphabets closed 1 year ago

AlphabetsAlphabets commented 1 year ago

Is your feature request related to a problem? Please describe. I'd like to be able to have an empty center when theme = 'doom'.

Describe the solution you'd like There should be an option such as empty = true, that will allow an empty center.

Describe alternatives you've considered I had this in my config.

                  center = {
                      {
                          icon = ' ',
                      },
                  },

So, the bare minimum is that desc must be set. desc must be text.

Additional context Image the screenshot, but at the words "EMPTY", it is actually just empty. I only want the header and footer only. No center. image

glepnir commented 1 year ago

just set a desc to empty string '' not work ?

AlphabetsAlphabets commented 1 year ago

No, it doesn't. I get this error.

Error detected while processing UIEnter Autocommands for "*":
Error executing lua callback: ...k/packer/opt/dashboard-nvim/lua/dashboard/theme/doom.lua:111: attempt to perform arithmetic on local 'col' (a nil value)
stack traceback:
        ...k/packer/opt/dashboard-nvim/lua/dashboard/theme/doom.lua:111: in function 'generate_center'
        ...k/packer/opt/dashboard-nvim/lua/dashboard/theme/doom.lua:167: in function <...k/packer/opt/dashboard-nvim/lua/dashboard/theme/doom.lua:165>
        ...te/pack/packer/opt/dashboard-nvim/lua/dashboard/init.lua:209: in function 'load_theme'
        ...te/pack/packer/opt/dashboard-nvim/lua/dashboard/init.lua:263: in function 'instance'
        ...site/pack/packer/opt/dashboard-nvim/plugin/dashboard.lua:12: in function <...site/pack/packer/opt/dashboard-nvim/plugin/dashboard.lua:10>
Press ENTER or type command to continue
glepnir commented 1 year ago

I will fix it tomorrow

AlphabetsAlphabets commented 1 year ago

I will fix it tomorrow

Thank you. I'll try and see if I can come up with a PR, if I can then I'll submit a PR. Been having fun with contributing to plugins I use.

AlphabetsAlphabets commented 1 year ago

@glepnir I made a PR that solves the issue: https://github.com/glepnir/dashboard-nvim/pull/329