Skip to content

Commit

Permalink
fix(comment): add better comments in build_palette;
Browse files Browse the repository at this point in the history
  • Loading branch information
5-pebbles committed Apr 15, 2024
1 parent 92fb6aa commit e4c6df8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/nordic/colors/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -102,5 +105,6 @@ end

-- build the first palette
build_palette()
-- after this we can call it with C.build_palette()

return C

0 comments on commit e4c6df8

Please sign in to comment.