vague2k / huez.nvim

All things color related. All Lua.
MIT License
102 stars 3 forks source link

Manager refactor #24

Closed vague2k closed 1 month ago

vague2k commented 1 month ago

This is purely a refactor, no bug fixes or feats of any kind.

  1. Cleaned up file structure
  2. huez_manager now renamed to huez-manager
  3. moved all management relevant apis to huez-manager/api, including colorscheme
  4. when using apis, the following convention is upheld as I felt it makes it alot more clear what specific action you are taking from the manager.
    
    -- This is preferred
    local api = require("huez-manager.api")
    api.live.add()

-- over this local manager = require("huez_manager.selected") manager.live_add()

It also allows for consistent method naming across interfaces such as
```lua
local api = require("huez-manager.api")
api.live.add() -- used to be manager.live_add()
api.live.installed() -- used to be manager.live_themes field

api.favorites.add() -- used to be manager.favourites_add()
api.favorites.installed() -- used to be manager.favourites_themes field
  1. add TODO comments in some places to indicate what needs attention

would like feedback when possible