feat(themes): clean up theme config names
This commit is contained in:
parent
4796732c93
commit
2fb6bddbc1
9 changed files with 47 additions and 27 deletions
|
@ -18,11 +18,11 @@ config.statusline = {
|
||||||
config.treesitter = {}
|
config.treesitter = {}
|
||||||
|
|
||||||
-- theming, don't forget to run :PackerSync and reload CosmicNvim when chaning themes
|
-- theming, don't forget to run :PackerSync and reload CosmicNvim when chaning themes
|
||||||
-- 'Catppuccino.nvim'
|
-- 'catppuccino'
|
||||||
-- 'gruvbox.nvim'
|
-- 'gruvbox'
|
||||||
-- 'nord.nvim'
|
-- 'nord'
|
||||||
-- 'rose-pine'
|
-- 'rose-pine'
|
||||||
config.theme = 'tokyonight.nvim' -- don't define or set to nil, if you want to enable your own theme in cosmic/config/plugins.lua
|
config.theme = 'tokyonight' -- don't define or set to nil, if you want to enable your own theme in cosmic/config/plugins.lua
|
||||||
|
|
||||||
-- lsp settings
|
-- lsp settings
|
||||||
config.lsp = {
|
config.lsp = {
|
||||||
|
|
|
@ -30,7 +30,6 @@ local default_config = {
|
||||||
tsserver = {
|
tsserver = {
|
||||||
format = false, -- disable formatting all together
|
format = false, -- disable formatting all together
|
||||||
},
|
},
|
||||||
null_ls = {},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,24 +1,27 @@
|
||||||
local config = require('cosmic.config')
|
local config = require('cosmic.config')
|
||||||
local colors = {}
|
local colors = {}
|
||||||
|
local mod = 'cosmic.core.theme.integrated.'
|
||||||
|
local supported_themes = {
|
||||||
|
'tokyonight',
|
||||||
|
'catppuccino',
|
||||||
|
'gruvbox',
|
||||||
|
'rose-pine',
|
||||||
|
'nord',
|
||||||
|
}
|
||||||
|
|
||||||
if config.theme == 'tokyonight.nvim' then
|
for _, theme in pairs(supported_themes) do
|
||||||
colors = require('cosmic.core.theme.integrated.tokyonight')
|
if theme == config.theme then
|
||||||
elseif config.theme == 'Catppuccino.nvim' then
|
colors = require(mod .. theme)
|
||||||
colors = require('cosmic.core.theme.integrated.catppuccin')
|
end
|
||||||
elseif config.theme == 'gruvbox.nvim' then
|
|
||||||
colors = require('cosmic.core.theme.integrated.gruvbox')
|
|
||||||
elseif config.theme == 'rose-pine' then
|
|
||||||
colors = require('cosmic.core.theme.integrated.rosepine')
|
|
||||||
elseif config.theme == 'nord.nvim' then
|
|
||||||
colors = require('cosmic.core.theme.integrated.nord')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if vim.tbl_isempty(colors) then
|
if vim.tbl_isempty(colors) then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- @TODO: move elsewhere
|
||||||
colors.notify_bg = 'Normal'
|
colors.notify_bg = 'Normal'
|
||||||
if config.theme == 'gruvbox.nvim' then
|
if config.theme == 'gruvbox' then
|
||||||
colors.notify_bg = colors.bg
|
colors.notify_bg = colors.bg
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
local theme = require('nord.colors')
|
local theme = require('nord.colors')
|
||||||
local colors = {
|
local colors = {
|
||||||
white = theme.nord4_gui,
|
white = theme.nord4_gui,
|
||||||
bg = theme.nord2_gui,
|
bg = theme.nord1_gui,
|
||||||
bg_highlight = theme.nord2_gui,
|
bg_highlight = theme.nord1_gui,
|
||||||
statusline_bg = theme.nord0_gui,
|
statusline_bg = theme.nord2_gui,
|
||||||
normal = theme.nord9_gui,
|
normal = theme.nord9_gui,
|
||||||
insert = theme.nord14_gui,
|
insert = theme.nord14_gui,
|
||||||
command = theme.nord13_gui,
|
command = theme.nord13_gui,
|
||||||
|
|
|
@ -1,4 +1,20 @@
|
||||||
local theme = require('rose-pine.palette')
|
local theme = require('rose-pine.palette')
|
||||||
|
--[[ base = '#191724',
|
||||||
|
surface = '#1f1d2e',
|
||||||
|
overlay = '#26233a',
|
||||||
|
inactive = '#555169',
|
||||||
|
subtle = '#6e6a86',
|
||||||
|
text = '#e0def4',
|
||||||
|
love = '#eb6f92',
|
||||||
|
gold = '#f6c177',
|
||||||
|
rose = '#ebbcba',
|
||||||
|
pine = '#31748f',
|
||||||
|
foam = '#9ccfd8',
|
||||||
|
iris = '#c4a7e7',
|
||||||
|
highlight = '#2a2837',
|
||||||
|
highlight_inactive = '#211f2d',
|
||||||
|
highlight_overlay = '#3a384a',
|
||||||
|
none = 'NONE', ]]
|
||||||
local colors = {
|
local colors = {
|
||||||
white = theme.text,
|
white = theme.text,
|
||||||
bg = theme.surface,
|
bg = theme.surface,
|
|
@ -1,4 +1,5 @@
|
||||||
local cosmic_modules = {
|
local cosmic_modules = {
|
||||||
|
'cosmic.compiled',
|
||||||
'cosmic.disabled',
|
'cosmic.disabled',
|
||||||
'cosmic.pluginsInit',
|
'cosmic.pluginsInit',
|
||||||
'cosmic.commands',
|
'cosmic.commands',
|
||||||
|
@ -15,7 +16,6 @@ for _, mod in ipairs(cosmic_modules) do
|
||||||
end
|
end
|
||||||
|
|
||||||
local user_config_modules = {
|
local user_config_modules = {
|
||||||
'cosmic.compiled',
|
|
||||||
'cosmic.config.editor',
|
'cosmic.config.editor',
|
||||||
'cosmic.config.mappings',
|
'cosmic.config.mappings',
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,8 +19,6 @@ lsp_installer.settings({
|
||||||
|
|
||||||
-- initial default serverse
|
-- initial default serverse
|
||||||
local requested_servers = {
|
local requested_servers = {
|
||||||
-- 'eslint',
|
|
||||||
-- 'efm',
|
|
||||||
'tsserver',
|
'tsserver',
|
||||||
'sumneko_lua',
|
'sumneko_lua',
|
||||||
'jsonls',
|
'jsonls',
|
||||||
|
|
|
@ -19,7 +19,7 @@ null_ls.config(vim.tbl_deep_extend('force', {
|
||||||
}),
|
}),
|
||||||
null_ls.builtins.code_actions.gitsigns,
|
null_ls.builtins.code_actions.gitsigns,
|
||||||
},
|
},
|
||||||
}, config.lsp.servers.null_ls))
|
}, config.lsp.servers.null_ls or {}))
|
||||||
|
|
||||||
require('lspconfig')['null-ls'].setup({
|
require('lspconfig')['null-ls'].setup({
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
|
|
|
@ -34,42 +34,46 @@ return packer.startup(function()
|
||||||
|
|
||||||
use({ -- color scheme
|
use({ -- color scheme
|
||||||
'folke/tokyonight.nvim',
|
'folke/tokyonight.nvim',
|
||||||
|
as = 'tokyonight',
|
||||||
config = function()
|
config = function()
|
||||||
vim.g.tokyonight_style = 'night'
|
vim.g.tokyonight_style = 'night'
|
||||||
vim.g.tokyonight_sidebars = { 'qf' }
|
vim.g.tokyonight_sidebars = { 'qf' }
|
||||||
vim.cmd('color tokyonight')
|
vim.cmd('color tokyonight')
|
||||||
end,
|
end,
|
||||||
disable = config.theme ~= 'tokyonight.nvim',
|
disable = config.theme ~= 'tokyonight',
|
||||||
})
|
})
|
||||||
|
|
||||||
use({
|
use({
|
||||||
'Pocco81/Catppuccino.nvim',
|
'Pocco81/Catppuccino.nvim',
|
||||||
|
as = 'catppuccino',
|
||||||
config = function()
|
config = function()
|
||||||
vim.cmd('color catppuccin')
|
vim.cmd('color catppuccin')
|
||||||
end,
|
end,
|
||||||
branch = 'dev-remaster',
|
branch = 'dev-remaster',
|
||||||
disable = config.theme ~= 'Catppuccino.nvim',
|
disable = config.theme ~= 'catppuccino',
|
||||||
})
|
})
|
||||||
|
|
||||||
use({
|
use({
|
||||||
'shaunsingh/nord.nvim',
|
'shaunsingh/nord.nvim',
|
||||||
|
as = 'nord',
|
||||||
config = function()
|
config = function()
|
||||||
vim.g.nord_contrast = true
|
vim.g.nord_contrast = true
|
||||||
vim.g.nord_borders = true
|
vim.g.nord_borders = true
|
||||||
require('nord').set()
|
require('nord').set()
|
||||||
end,
|
end,
|
||||||
disable = config.theme ~= 'nord.nvim',
|
disable = config.theme ~= 'nord',
|
||||||
})
|
})
|
||||||
|
|
||||||
use({
|
use({
|
||||||
'ellisonleao/gruvbox.nvim',
|
'ellisonleao/gruvbox.nvim',
|
||||||
|
as = 'gruvbox',
|
||||||
requires = { 'rktjmp/lush.nvim' },
|
requires = { 'rktjmp/lush.nvim' },
|
||||||
config = function()
|
config = function()
|
||||||
-- todo: does nothing
|
-- todo: does nothing
|
||||||
vim.o.background = 'dark'
|
vim.o.background = 'dark'
|
||||||
vim.cmd('colorscheme gruvbox')
|
vim.cmd('colorscheme gruvbox')
|
||||||
end,
|
end,
|
||||||
disable = config.theme ~= 'gruvbox.nvim',
|
disable = config.theme ~= 'gruvbox',
|
||||||
})
|
})
|
||||||
|
|
||||||
use({
|
use({
|
||||||
|
|
Loading…
Add table
Reference in a new issue