NTBBloodbath / galaxyline.nvim

neovim statusline plugin written in lua
MIT License
163 stars 16 forks source link

Feature request: add a setup function #10

Open NTBBloodbath opened 2 years ago

NTBBloodbath commented 2 years ago

Since I'm someone who really likes customization and dynamic stuff I think that a setup function would be really useful to modify some internal parameters, by example modify the minimal width in condition.hide_in_width and extend how customizable and extensible galaxyline is.

This would allow the end user to modify almost everything about how galaxyline works and create more robust themes to fit better their own needs.

Note: this setup function will not automatically handle your theme (or maybe yes?)


In case we choose to handle theming in setup function we could use something like this

require("galaxyline").setup({
    -- theme can handle two possible values
    -- 1. a galaxyline built-in theme, e.g. "neonline"
    -- 2. a user-defined theme, e.g. "plugins.configs.galaxyline_theme"
    theme = "eviline",
})

Handling theme in setup could also allow us to make better standards and maybe let us refact stuff to make color themes like lualine (lua/galaxyline/colors/foo.lua in the colorschemes).

poperigby commented 2 years ago

I think having setup handle theming would be a great idea, because I'm pretty confused how I set my theme/colorscheme right now.