feat: added colorscheme names for styles
This commit is contained in:
1
colors/tokyonight-day.lua
Normal file
1
colors/tokyonight-day.lua
Normal file
@@ -0,0 +1 @@
|
|||||||
|
require("tokyonight").load({ style = "day" })
|
||||||
1
colors/tokyonight-night.lua
Normal file
1
colors/tokyonight-night.lua
Normal file
@@ -0,0 +1 @@
|
|||||||
|
require("tokyonight").load({ style = "night" })
|
||||||
1
colors/tokyonight-storm.lua
Normal file
1
colors/tokyonight-storm.lua
Normal file
@@ -0,0 +1 @@
|
|||||||
|
require("tokyonight").load({ style = "storm" })
|
||||||
1
colors/tokyonight.lua
Normal file
1
colors/tokyonight.lua
Normal file
@@ -0,0 +1 @@
|
|||||||
|
require("tokyonight").load()
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
" clear cache so this reloads changes.
|
|
||||||
" useful for development
|
|
||||||
" lua package.loaded['tokyonight'] = nil
|
|
||||||
" lua package.loaded['tokyonight.theme'] = nil
|
|
||||||
" lua package.loaded['tokyonight.colors'] = nil
|
|
||||||
" lua package.loaded['tokyonight.util'] = nil
|
|
||||||
lua package.loaded['tokyonight.config'] = nil
|
|
||||||
|
|
||||||
lua require('tokyonight').colorscheme()
|
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
local util = require("tokyonight.util")
|
local util = require("tokyonight.util")
|
||||||
local config = require("tokyonight.config").options
|
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
---@return ColorScheme
|
---@return ColorScheme
|
||||||
function M.setup(opts)
|
function M.setup(opts)
|
||||||
opts = opts or {}
|
opts = opts or {}
|
||||||
|
local config = require("tokyonight.config").options
|
||||||
|
|
||||||
-- Color Palette
|
-- Color Palette
|
||||||
---@class ColorScheme
|
---@class ColorScheme
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
-- shim vim for kitty and other generators
|
|
||||||
vim = vim or { g = {}, o = {} }
|
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
---@class Config
|
---@class Config
|
||||||
@@ -32,6 +29,10 @@ function M.setup(options)
|
|||||||
M.options = vim.tbl_deep_extend("force", {}, defaults, options or {})
|
M.options = vim.tbl_deep_extend("force", {}, defaults, options or {})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function M.extend(options)
|
||||||
|
M.options = vim.tbl_deep_extend("force", {}, M.options or defaults, options or {})
|
||||||
|
end
|
||||||
|
|
||||||
M.setup()
|
M.setup()
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
@@ -3,8 +3,13 @@ local theme = require("tokyonight.theme")
|
|||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
function M.colorscheme()
|
function M.load(opts)
|
||||||
|
if opts then
|
||||||
|
require("tokyonight.config").extend(opts)
|
||||||
|
end
|
||||||
util.load(theme.setup())
|
util.load(theme.setup())
|
||||||
end
|
end
|
||||||
|
|
||||||
|
M.colorscheme = M.load
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
Reference in New Issue
Block a user