feat(themes): add onedark
This commit is contained in:
parent
fb7b136a24
commit
b485e1c8fb
6 changed files with 43 additions and 22 deletions
|
@ -20,9 +20,10 @@ 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
|
||||||
-- 'catppuccin'
|
-- 'catppuccin'
|
||||||
-- 'gruvbox'
|
-- 'gruvbox'
|
||||||
|
-- 'nightfox'
|
||||||
-- 'nord'
|
-- 'nord'
|
||||||
|
-- 'onedark'
|
||||||
-- 'rose-pine'
|
-- 'rose-pine'
|
||||||
-- nightfox
|
|
||||||
config.theme = 'tokyonight' -- 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
|
||||||
|
|
24
lua/cosmic/core/theme/integrated/onedark.lua
Normal file
24
lua/cosmic/core/theme/integrated/onedark.lua
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
local theme = require('onedark.colors')
|
||||||
|
|
||||||
|
local colors = {
|
||||||
|
white = theme.fg,
|
||||||
|
bg = theme.bg3,
|
||||||
|
bg_highlight = theme.bg3,
|
||||||
|
statusline_bg = theme.bg0,
|
||||||
|
normal = theme.green,
|
||||||
|
insert = theme.cyan,
|
||||||
|
command = theme.orange,
|
||||||
|
visual = theme.purple,
|
||||||
|
replace = theme.red,
|
||||||
|
diffAdd = theme.green,
|
||||||
|
diffModified = theme.orang,
|
||||||
|
diffDeleted = theme.red,
|
||||||
|
trace = theme.orange,
|
||||||
|
hint = theme.cyan,
|
||||||
|
info = theme.green,
|
||||||
|
error = theme.red,
|
||||||
|
warn = theme.orange,
|
||||||
|
floatBorder = theme.bg3,
|
||||||
|
selection_caret = theme.purple,
|
||||||
|
}
|
||||||
|
return colors
|
|
@ -1,20 +1,5 @@
|
||||||
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,12 +1,13 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.supported_themes = {
|
M.supported_themes = {
|
||||||
'tokyonight',
|
|
||||||
'catppuccin',
|
'catppuccin',
|
||||||
'gruvbox',
|
'gruvbox',
|
||||||
'rose-pine',
|
|
||||||
'nightfox',
|
'nightfox',
|
||||||
'nord',
|
'nord',
|
||||||
|
'onedark',
|
||||||
|
'rose-pine',
|
||||||
|
'tokyonight',
|
||||||
}
|
}
|
||||||
|
|
||||||
function M.init(use, config)
|
function M.init(use, config)
|
||||||
|
@ -70,9 +71,17 @@ function M.init(use, config)
|
||||||
config = function()
|
config = function()
|
||||||
vim.cmd('color nightfox')
|
vim.cmd('color nightfox')
|
||||||
end,
|
end,
|
||||||
disable = config.theme ~= 'nightfox'
|
disable = config.theme ~= 'nightfox',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
use({
|
||||||
|
'navarasu/onedark.nvim',
|
||||||
|
as = 'onedark',
|
||||||
|
config = function()
|
||||||
|
vim.cmd('color onedark')
|
||||||
|
end,
|
||||||
|
disable = config.theme ~= 'onedark',
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -129,10 +129,11 @@ function M.update()
|
||||||
on_exit = function()
|
on_exit = function()
|
||||||
if vim.tbl_isempty(errors) then
|
if vim.tbl_isempty(errors) then
|
||||||
vim.notify(
|
vim.notify(
|
||||||
'Please restart CosmicNvim and run `:PackerSync`',
|
'Updated! Running CosmicReloadSync...',
|
||||||
vim.log.levels.INFO,
|
vim.log.levels.INFO,
|
||||||
{ title = 'CosmicNvim Updated!', timeout = 30000 }
|
{ title = 'CosmicNvim', timeout = 30000 }
|
||||||
)
|
)
|
||||||
|
M.reload_user_config_sync()
|
||||||
else
|
else
|
||||||
table.insert(errors, 1, 'Something went wrong! Please pull changes manually.')
|
table.insert(errors, 1, 'Something went wrong! Please pull changes manually.')
|
||||||
table.insert(errors, 2, '')
|
table.insert(errors, 2, '')
|
||||||
|
|
|
@ -80,6 +80,7 @@ CosmicNvim comes with first-class support for the following themes:
|
||||||
- [Nord](https://github.com/shaunsingh/nord.nvim)
|
- [Nord](https://github.com/shaunsingh/nord.nvim)
|
||||||
- [Tokyonight](https://github.com/folke/tokyonight.nvim)
|
- [Tokyonight](https://github.com/folke/tokyonight.nvim)
|
||||||
- [Nightfox](https://github.com/EdenEast/nightfox.nvim)
|
- [Nightfox](https://github.com/EdenEast/nightfox.nvim)
|
||||||
|
- [Onedark](https://github.com/navarasu/onedark.nvim)
|
||||||
|
|
||||||
[Additional Screenshots](https://github.com/mattleong/CosmicNvim/wiki/Theme-Screenshots)
|
[Additional Screenshots](https://github.com/mattleong/CosmicNvim/wiki/Theme-Screenshots)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue