From 75d552cda2b702945ed92ad4c0849e922e652a54 Mon Sep 17 00:00:00 2001 From: Taylor Bockman Date: Tue, 30 Jul 2019 22:03:57 -0700 Subject: [PATCH] get vim-material to work properly --- dotfiles/config/nvim/init.vim | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/dotfiles/config/nvim/init.vim b/dotfiles/config/nvim/init.vim index 72da0d0..8a44ff3 100644 --- a/dotfiles/config/nvim/init.vim +++ b/dotfiles/config/nvim/init.vim @@ -10,8 +10,6 @@ call plug#begin('~/.config/nvim/plugged') " Material theme Plug 'hzchirs/vim-material' -set background=dark -colorscheme vim-material " Syntastic Plug 'scrooloose/syntastic' @@ -116,6 +114,16 @@ Plug 'https://github.com/vim-scripts/dbext.vim' " end plugin list call plug#end() +" Configure vim for true color display otherwise vim-material won't display +" correctly. +if (has('nvim')) + let $NVIM_TUI_ENABLE_TRUE_COLOR = 1 +endif + +if (has('termguicolors')) + set termguicolors +endif + " Standard variables set expandtab " tabs to spaces set tabstop=2 " spaces entered when tab key is pressed @@ -258,3 +266,8 @@ let g:indentLine_enabled=0 " Leader + i will toggle line indent guides map i :IndentLinesToggle + +" Color scheme setting is done absolutely last to make sure everything is +" available to vim +set background=dark +colorscheme vim-material