diff options
author | Xiao Pan <gky44px1999@gmail.com> | 2024-04-14 19:11:14 -0700 |
---|---|---|
committer | Xiao Pan <gky44px1999@gmail.com> | 2024-04-14 19:11:14 -0700 |
commit | 4976d4807e1e04980f259d184c9edea960a0a502 (patch) | |
tree | 567a21bf9342237b13ed524162f6f9808f96ddac /home/xyz/.config/nvim/init.vim | |
parent | 732a2a37afdccbafa71721694a95127016eef800 (diff) |
nvim customize old theme make fold title higher contrast
I choose to go back to old colorscheme plugin I use and customize it to
make fold title higher contrast and more readable. Becase other theme
plugins have other issues, so I would rather stick to the old plugin,
plus it can be customized easily.
Diffstat (limited to 'home/xyz/.config/nvim/init.vim')
-rw-r--r-- | home/xyz/.config/nvim/init.vim | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/home/xyz/.config/nvim/init.vim b/home/xyz/.config/nvim/init.vim index fde335e4..31fe2a44 100644 --- a/home/xyz/.config/nvim/init.vim +++ b/home/xyz/.config/nvim/init.vim @@ -9,11 +9,11 @@ call plug#begin() "Plug 'junegunn/fzf.vim' "Plug 'vim-perl/vim-perl', { 'for': 'perl', 'do': 'make clean carp dancer highlight-all-pragmas moose test-more try-tiny' } Plug 'glacambre/firenvim', { 'do': { _ -> firenvim#install(0) } } +" tinted-theming/base16-vim has low contrast on fold title make it unreadable, but I customized it easily " chriskempson/base16-vim doesn't do bold/italic for markdown syntax, and not maintained +" RRethy/nvim-base16 does not highlight markdown codeblocks " tinted-theming/base16-vim and RRethy/nvim-base16 seem both work, both support tree-sitter -" In the past, I prefer tinted-theming/base16-vim because of darker status bar color? -" Now, I prefer RRethy/nvim-base16 because of higher contrast on fold title, so much more readable -Plug 'RRethy/nvim-base16' +Plug 'tinted-theming/base16-vim' " nvim-treesitter does not support markdown right now, so wait "Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} " We recommend updating the parsers on update " use latest vim-markdown @@ -42,6 +42,15 @@ function Autocmd_set_fenc() endif endfunction +" https://github.com/tinted-theming/base16-vim?tab=readme-ov-file#customization +function! s:base16_customize() abort + " make fold title more contrast and readable, by reverting some changes from: + " https://github.com/tinted-theming/base16-vim/pull/43/files + " tested with base16-tomorrow-night theme + call Base16hi("FoldColumn", g:base16_gui0C, g:base16_gui01, g:base16_cterm0C, g:base16_cterm01, "", "") + call Base16hi("Folded", g:base16_gui03, g:base16_gui01, g:base16_cterm03, g:base16_cterm01, "", "") +endfunction + " not fully understood augroup, recommanded in :help " https://www.youtube.com/watch?v=dBBUOO1PRIU augroup mycmd @@ -74,9 +83,12 @@ augroup mycmd "" https://stackoverflow.com/q/158968/9008720 " or use setlocal cc= autocmd FileType mail,gitcommit setlocal colorcolumn=72 + " https://github.com/tinted-theming/base16-vim?tab=readme-ov-file#customization + autocmd ColorScheme * call s:base16_customize() augroup END " :h markdown, for vim default tpope/vim-markdown +" enable markdown fold will make opening large files slower, so I don't enable it "let g:markdown_folding = 1 " g:markdown_minlines before nvim 0.8, 500 works well; version 0.8 makes even 400 noticeable slow when keep pressing gk let g:markdown_minlines = 350 |