From 5f02cd6a4d5e92b3f42d87780e911f0763d94d41 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 27 Apr 2020 17:50:23 -0400 Subject: added some color --- README.md | 2 ++ init.vim | 6 ++++++ keys/mappings.vim | 1 + lua/plug-colorizer.lua | 13 +++++++++++++ plug-config/commentary.vim | 3 +++ plug-config/rainbow.vim | 4 ++++ themes/airline.vim | 1 + vim-plug/plugins.vim | 5 +++++ 8 files changed, 35 insertions(+) create mode 100644 lua/plug-colorizer.lua create mode 100644 plug-config/commentary.vim create mode 100644 plug-config/rainbow.vim diff --git a/README.md b/README.md index a252affc..7e5c71d7 100644 --- a/README.md +++ b/README.md @@ -70,3 +70,5 @@ let g:node_host_prog = expand("~/.nvm/versions/node/v12.16.1/bin/node") " <- exa - silver_searcher - fd - universal-ctags + +Explainations and installation instrucion can be found on my blog diff --git a/init.vim b/init.vim index 3f821cdf..f7675969 100644 --- a/init.vim +++ b/init.vim @@ -1,3 +1,4 @@ +" Viml Plugins source $HOME/.config/nvim/vim-plug/plugins.vim source $HOME/.config/nvim/general/settings.vim source $HOME/.config/nvim/general/paths.vim @@ -8,3 +9,8 @@ source $HOME/.config/nvim/themes/airline.vim source $HOME/.config/nvim/plug-config/coc.vim source $HOME/.config/nvim/plug-config/rnvimr.vim source $HOME/.config/nvim/plug-config/fzf.vim +source $HOME/.config/nvim/plug-config/commentary.vim +source $HOME/.config/nvim/plug-config/rainbow.vim + +" Lua Plugins +lua require'plug-colorizer' diff --git a/keys/mappings.vim b/keys/mappings.vim index 577df5cf..57a763f1 100644 --- a/keys/mappings.vim +++ b/keys/mappings.vim @@ -39,3 +39,4 @@ nnoremap h nnoremap j nnoremap k nnoremap l + diff --git a/lua/plug-colorizer.lua b/lua/plug-colorizer.lua new file mode 100644 index 00000000..f365160d --- /dev/null +++ b/lua/plug-colorizer.lua @@ -0,0 +1,13 @@ +require'colorizer'.setup( + {'*';}, + { + RGB = true; -- #RGB hex codes + RRGGBB = true; -- #RRGGBB hex codes + names = true; -- "Name" codes like Blue + RRGGBBAA = true; -- #RRGGBBAA hex codes + rgb_fn = true; -- CSS rgb() and rgba() functions + hsl_fn = true; -- CSS hsl() and hsla() functions + css = true; -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB + css_fn = true; -- Enable all CSS *functions*: rgb_fn, hsl_fn + }) + diff --git a/plug-config/commentary.vim b/plug-config/commentary.vim new file mode 100644 index 00000000..8bf021d8 --- /dev/null +++ b/plug-config/commentary.vim @@ -0,0 +1,3 @@ + +nnoremap / :Commentary +vnoremap / :Commentary diff --git a/plug-config/rainbow.vim b/plug-config/rainbow.vim new file mode 100644 index 00000000..0dc9769c --- /dev/null +++ b/plug-config/rainbow.vim @@ -0,0 +1,4 @@ +let g:rainbow#max_level = 16 +let g:rainbow#pairs = [['(', ')'], ['[', ']'], ['{', '}']] + +autocmd FileType * RainbowParentheses diff --git a/themes/airline.vim b/themes/airline.vim index c46d5bce..a3b26dca 100644 --- a/themes/airline.vim +++ b/themes/airline.vim @@ -9,6 +9,7 @@ let g:airline#extensions#tabline#right_alt_sep = '' let g:airline_powerline_fonts = 1 let g:airline_left_sep = '' let g:airline_right_sep = '' +let g:airline_right_alt_sep = '' " Switch to your current theme let g:airline_theme = 'onedark' diff --git a/vim-plug/plugins.vim b/vim-plug/plugins.vim index 73b24680..e394b58e 100644 --- a/vim-plug/plugins.vim +++ b/vim-plug/plugins.vim @@ -26,6 +26,11 @@ call plug#begin('~/.config/nvim/autoload/plugged') Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } Plug 'junegunn/fzf.vim' Plug 'airblade/vim-rooter' + " Better Comments + Plug 'tpope/vim-commentary' + " Add some color + Plug 'norcalli/nvim-colorizer.lua' + Plug 'junegunn/rainbow_parentheses.vim' -- cgit v1.2.3