temp, testing
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
local defaultColorScheme = "tokyodark"
|
||||
|
||||
function SetColorSchemeWrapper(scheme)
|
||||
scheme = scheme or defaultColorScheme
|
||||
vim.cmd.colorscheme(scheme)
|
||||
end
|
||||
|
||||
SetColorSchemeWrapper(defaultColorScheme)
|
||||
--
|
||||
-- SetColorSchemeWrapper("tokyodark")
|
||||
-- SetColorSchemeWrapper("tokyonight-night")
|
||||
-- SetColorSchemeWrapper("bamboo-vulgaris")
|
||||
-- SetColorSchemeWrapper("rose-pine-main")
|
||||
-- SetColorSchemeWrapper("gruvbox")
|
||||
-- SetColorSchemeWrapper("slate")
|
||||
-- SetColorSchemeWrapper("sorbet")
|
||||
|
@@ -22,8 +22,13 @@ vim.opt.rtp:prepend(path_lazy_nvim)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
{ import = "plugins_lazy" },
|
||||
{ import = "plugins_lazy" },
|
||||
},
|
||||
checker = { enabled = false },
|
||||
change_detection = { notify = false },
|
||||
dev = {
|
||||
path = "~/dev/git/other/omarchy/plugins",
|
||||
patterns = { 'LazyVim' },
|
||||
fallback = false,
|
||||
},
|
||||
})
|
||||
|
31
src_files/.config/nvim/lua/theme.lua
Normal file
31
src_files/.config/nvim/lua/theme.lua
Normal file
@@ -0,0 +1,31 @@
|
||||
local defaultColorScheme = "tokyodark"
|
||||
-- local defaultColorScheme = "tokyonight-night"
|
||||
-- local defaultColorScheme = "bamboo-vulgaris"
|
||||
-- local defaultColorScheme = "rose-pine-main"
|
||||
-- local defaultColorScheme = "gruvbox"
|
||||
-- local defaultColorScheme = "slate"
|
||||
-- local defaultColorScheme = "sorbet"
|
||||
|
||||
local ok, theme_specs = pcall(dofile, (os.getenv('DIR_CURRENT_THEME') or "") .. "/neovim.lua")
|
||||
if not ok then
|
||||
vim.notify(
|
||||
'current theme file not found, using default: ' .. defaultColorScheme,
|
||||
vim.log.levels.INFO
|
||||
)
|
||||
vim.cmd.colorscheme(defaultColorScheme)
|
||||
return
|
||||
end
|
||||
|
||||
local first = theme_specs[1]
|
||||
local plugin_name = (type(first.name) == 'string' and first.name)
|
||||
or (type(first[1]) == 'string' and first[1]:match('.*/(.*)'))
|
||||
or 'plugin_name_not_found'
|
||||
|
||||
local last = theme_specs[#theme_specs]
|
||||
local colorscheme = ((type(last.opts) == 'table' and type(last.opts.colorscheme) == 'string') and last.opts.colorscheme)
|
||||
or plugin_name:gsub("%.%w+$", "")
|
||||
|
||||
colorscheme = (colorscheme == 'plugin_name_not_found' and defaultColorScheme)
|
||||
or colorscheme
|
||||
vim.cmd.colorscheme(colorscheme)
|
||||
|
Reference in New Issue
Block a user