From e4c6df8b021ee7b3db4b5af18f801857103b2b80 Mon Sep 17 00:00:00 2001 From: 5-pebbles <5-pebble@protonmail.com> Date: Mon, 15 Apr 2024 13:29:41 +0000 Subject: [PATCH] fix(comment): add better comments in build_palette; --- lua/nordic/colors/init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/nordic/colors/init.lua b/lua/nordic/colors/init.lua index c286c253..8843f434 100644 --- a/lua/nordic/colors/init.lua +++ b/lua/nordic/colors/init.lua @@ -4,9 +4,12 @@ local P = require 'nordic.colors.nordic' local C = {} local function build_palette() - -- make a new palette + -- Make a new palette. + -- Copy the original palette this overrides C. C = vim.deepcopy(P) + -- Because of the override we need to re-add the build_palette. C.build_palette = build_palette + -- That is also why it is not attached to C. local options = require('nordic.config').options @@ -102,5 +105,6 @@ end -- build the first palette build_palette() +-- after this we can call it with C.build_palette() return C