AlexvZyl/nordic.nvim

Refactor to make code less confusing

Closed this issue · 5 comments

I will edit this and add items to the list as I run into them

Here is a list of things I would like to do:

  1. all colors have separate values in the palette we don't change these just make new ones.

  2. all configuration happens in extend_palette that way its safe to use colors in the default configuration.

  3. All configuration options are reversible so if I load it with one config and then another there will be no issues. this builds on point 1.

@AlexvZyl

is C.extended (in colors.init.lua) needed if Lua just loads the module once couldn't you just remove that whole part?

I am going to bed, I will finish tomorrow but here is the branch with my changes thus far: https://github.com/5-pebbles/nordic.nvim/tree/refactor

Already removed the extend_palette function in 36e0c38.

Doesn't that mean you cant change the config once loaded? That's kind of the exact opposite of what I am trying to do...

I guess I will just keep mine a fork, I like being able to change the configuration while the theme is in use.

I was just talking about something like this: https://github.com/5-pebbles/nordic.nvim/commit/f1965437f60c40bb33fb99ab45fb1696b2741a0c

Also you will need to do a complete refactor of your tests. If you want to try new configurations you will need to put each on in its own test and close neovim between them.

Alright here are my changes: https://github.com/5-pebbles/nordic.nvim/tree/refactor

They build on top of #101.

My config has a theme selector which will stop working if dev is merged, so I am going to stick with my fork.