From cfebb7963768606db9591091dfb7fd90edb79b3c Mon Sep 17 00:00:00 2001 From: jdhao Date: Thu, 24 Dec 2020 22:38:06 +0800 Subject: [PATCH] Add tokyonight colorscheme --- core/plugins.vim | 1 + core/ui.vim | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/core/plugins.vim b/core/plugins.vim index 56633ee..04d8a78 100644 --- a/core/plugins.vim +++ b/core/plugins.vim @@ -91,6 +91,7 @@ Plug 'lifepillar/vim-solarized8' Plug 'joshdick/onedark.vim' Plug 'KeitaNakamura/neodark.vim' Plug 'sainnhe/edge' +Plug 'ghifarit53/tokyonight-vim' Plug 'sainnhe/sonokai' if !exists('g:started_by_firenvim') diff --git a/core/ui.vim b/core/ui.vim index ec9b5f4..350a7c1 100644 --- a/core/ui.vim +++ b/core/ui.vim @@ -69,8 +69,16 @@ function! s:my_theme_dict.sonokai() dict abort colorscheme sonokai endfunction +function! s:my_theme_dict.tokyonight() dict abort + if !utils#HasColorscheme('tokyonight') | return | endif + + let g:tokyonight_style = 'night' " available: night, storm + let g:tokyonight_enable_italic = 1 + colorscheme tokyonight +endfunction + let s:candidate_theme = ['gruvbox8', 'deus', 'solarized8', 'onedark', 'neodark', - \ 'edge', 'sonokai'] + \ 'edge', 'sonokai', 'tokyonight'] let s:idx = utils#RandInt(0, len(s:candidate_theme)-1) let s:theme = s:candidate_theme[s:idx]