File tree Expand file tree Collapse file tree 4 files changed +6
-10
lines changed
Expand file tree Collapse file tree 4 files changed +6
-10
lines changed Original file line number Diff line number Diff line change 1- local util = require (" tokyonight.util" )
2-
31local M = {}
42
53--- @param colors ColorScheme
@@ -46,7 +44,6 @@ function M.generate(colors)
4644 if vim .fn .hlexists (v [2 ]) == 1 then
4745 hl_group = v [2 ]
4846 end
49- print (hl_group )
5047 assert (hl_group , " hl_group not found for " .. v [2 ])
5148 local hl = vim .api .nvim_get_hl (0 , { name = hl_group , link = false })
5249 assert (hl , " hl not found for " .. hl_group )
@@ -75,6 +72,4 @@ export FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS \
7572"
7673]]
7774
78- print (M .generate ())
79-
8075return M
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ M.extras = {
5454}
5555
5656function M .setup ()
57- local tokyonight = require (" tokyonight" )
57+ local tokyonight = require (" tokyonight.theme " )
5858 vim .o .background = " dark"
5959
6060 -- map of style to style name
@@ -74,7 +74,7 @@ function M.setup()
7474 local info = M .extras [extra ]
7575 local plugin = require (" tokyonight.extra." .. extra )
7676 for style , style_name in pairs (styles ) do
77- local colors , groups , opts = tokyonight .load ({ style = style , plugins = { all = true } })
77+ local colors , groups , opts = tokyonight .setup ({ style = style , plugins = { all = true } })
7878 local fname = extra
7979 .. (info .subdir and " /" .. info .subdir .. " /" or " " )
8080 .. " /tokyonight"
Original file line number Diff line number Diff line change @@ -7,7 +7,10 @@ local M = {}
77local function generate_defs (colors )
88 local defs = {}
99
10- for key , value in pairs (colors ) do
10+ local keys = vim .tbl_keys (colors )
11+ table.sort (keys )
12+ for _ , key in ipairs (keys ) do
13+ local value = colors [key ]
1114 -- Skip keys that start with underscore (metadata) and "none"
1215 if not key :match (" ^_" ) and key ~= " none" then
1316 if type (value ) == " string" then
Original file line number Diff line number Diff line change 1- local Util = require (" tokyonight.util" )
2-
31local M = {}
42
53--- @param opts ? tokyonight.Config
You can’t perform that action at this time.
0 commit comments