From d9eeeae3a552a64d21225e24b7d046daa02bbbc5 Mon Sep 17 00:00:00 2001 From: Matt Leong Date: Mon, 22 Nov 2021 14:08:04 -0800 Subject: [PATCH] feat(themes): add dracula --- lua/cosmic/config/examples/config.lua | 1 + lua/cosmic/core/theme/integrated/dracula.lua | 51 ++++++++++++++++++++ lua/cosmic/core/theme/integrated/onedark.lua | 2 +- lua/cosmic/core/theme/plugins.lua | 10 ++++ readme.md | 7 +-- 5 files changed, 67 insertions(+), 4 deletions(-) create mode 100644 lua/cosmic/core/theme/integrated/dracula.lua diff --git a/lua/cosmic/config/examples/config.lua b/lua/cosmic/config/examples/config.lua index f8cb854..60733bc 100644 --- a/lua/cosmic/config/examples/config.lua +++ b/lua/cosmic/config/examples/config.lua @@ -19,6 +19,7 @@ config.treesitter = {} -- theming, don't forget to run :PackerSync and reload CosmicNvim when chaning themes -- 'catppuccin' +-- 'dracula' -- 'gruvbox' -- 'nightfox' -- 'nord' diff --git a/lua/cosmic/core/theme/integrated/dracula.lua b/lua/cosmic/core/theme/integrated/dracula.lua new file mode 100644 index 0000000..a543285 --- /dev/null +++ b/lua/cosmic/core/theme/integrated/dracula.lua @@ -0,0 +1,51 @@ +local a = { + bg = '#282A36', + fg = '#F8F8F2', + selection = '#44475A', + comment = '#6272A4', + red = '#FF5555', + orange = '#FFB86C', + yellow = '#F1FA8C', + green = '#50fa7b', + purple = '#BD93F9', + cyan = '#8BE9FD', + pink = '#FF79C6', + bright_red = '#FF6E6E', + bright_green = '#69FF94', + bright_yellow = '#FFFFA5', + bright_blue = '#D6ACFF', + bright_magenta = '#FF92DF', + bright_cyan = '#A4FFFF', + bright_white = '#FFFFFF', + menu = '#21222C', + visual = '#3E4452', + gutter_fg = '#4B5263', + nontext = '#3B4048', + white = '#ABB2BF', + black = '#191A21', +} + +local theme = require('dracula').colors() + +local colors = { + white = theme.white, + bg = theme.nontext, + bg_highlight = theme.nontext, + statusline_bg = theme.bg, + normal = theme.bright_green, + insert = theme.bright_cyan, + command = theme.orange, + visual = theme.bright_purple, + replace = theme.bright_red, + diffAdd = theme.bright_green, + diffModified = theme.orange, + diffDeleted = theme.bright_red, + trace = theme.orange, + hint = theme.bright_cyan, + info = theme.bright_green, + error = theme.bright_red, + warn = theme.orange, + floatBorder = theme.bright_blue, + selection_caret = theme.bright_blue, +} +return colors diff --git a/lua/cosmic/core/theme/integrated/onedark.lua b/lua/cosmic/core/theme/integrated/onedark.lua index 07d92ee..814f30f 100644 --- a/lua/cosmic/core/theme/integrated/onedark.lua +++ b/lua/cosmic/core/theme/integrated/onedark.lua @@ -11,7 +11,7 @@ local colors = { visual = theme.purple, replace = theme.red, diffAdd = theme.green, - diffModified = theme.orang, + diffModified = theme.orange, diffDeleted = theme.red, trace = theme.orange, hint = theme.cyan, diff --git a/lua/cosmic/core/theme/plugins.lua b/lua/cosmic/core/theme/plugins.lua index 7f2dbd8..71882a1 100644 --- a/lua/cosmic/core/theme/plugins.lua +++ b/lua/cosmic/core/theme/plugins.lua @@ -2,6 +2,7 @@ local M = {} M.supported_themes = { 'catppuccin', + 'dracula', 'gruvbox', 'nightfox', 'nord', @@ -82,6 +83,15 @@ function M.init(use, config) end, disable = config.theme ~= 'onedark', }) + + use({ + 'Mofiqul/dracula.nvim', + as = 'dracula', + config = function() + vim.cmd('color dracula') + end, + disable = config.theme ~= 'dracula', + }) end return M diff --git a/readme.md b/readme.md index 142cbd1..3f187bc 100644 --- a/readme.md +++ b/readme.md @@ -75,12 +75,13 @@ CosmicNvim uninstallation [details](https://github.com/mattleong/CosmicNvim/wiki CosmicNvim comes with first-class support for the following themes: - [Catppuccino](https://github.com/Pocco81/Catppuccino.nvim) +- [Dracula](https://github.com/Mofiqul/dracula.nvim) - [Gruvbox](https://github.com/ellisonleao/gruvbox.nvim) -- [Rose-pine](https://github.com/rose-pine/neovim) -- [Nord](https://github.com/shaunsingh/nord.nvim) -- [Tokyonight](https://github.com/folke/tokyonight.nvim) - [Nightfox](https://github.com/EdenEast/nightfox.nvim) +- [Nord](https://github.com/shaunsingh/nord.nvim) - [Onedark](https://github.com/navarasu/onedark.nvim) +- [Rose-pine](https://github.com/rose-pine/neovim) +- [Tokyonight](https://github.com/folke/tokyonight.nvim) [Additional Screenshots](https://github.com/mattleong/CosmicNvim/wiki/Theme-Screenshots)