From 29efc78b6fec1e815f5bc46300910362a2e65a2a Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Thu, 19 Jul 2018 14:00:57 +0200 Subject: nvim: Replace old modeline with lightline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johannes Löthberg --- nvim/init.vim | 49 +++++++++++-------------------------------------- 1 file changed, 11 insertions(+), 38 deletions(-) diff --git a/nvim/init.vim b/nvim/init.vim index 0e2093b..0365c96 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -4,6 +4,8 @@ call plug#begin(expand('$XDG_CONFIG_HOME/nvim/plugs')) +Plug 'itchyny/lightline.vim' " Modeline replacement + Plug 'rust-lang/rust.vim' Plug 'tpope/vim-git' Plug 'chriskempson/base16-vim' @@ -11,6 +13,15 @@ Plug 'chriskempson/base16-vim' call plug#end() +""" +" Plugin settings +" + +" Lightline +let g:lightline = { + \ 'colorscheme': 'wombat', + \ } + """ " Set options @@ -83,44 +94,6 @@ noremap px :Denite buffer file_mru file_rec noremap pg :Denite grep - -""" -" Statusline -" - -set statusline= -set statusline+=[%n] " Buffer number -set statusline+=%<\ " Where to truncate -set statusline+=%.99f " Relative path to file -set statusline+=\ %y " Filetype flag, [c]; [help] -set statusline+=%w " Preview window flag, [Preview] -set statusline+=%m " Modified flag, [+]; [-] - -" Show a warning if file is read only, [RO] -set statusline+=%#identifier# -set statusline+=%r -set statusline+=%* - -" Show a warning if file format isn’t unix -set statusline+=%#warningmsg# -set statusline+=%{&ff!='unix'?'['.&ff.']':''} -set statusline+=%* - -" Show a warning if file encoding isn’t utf-8 -set statusline+=%#warningmsg# -set statusline+=%{(&fenc!='utf-8'&&&fenc!='')?'['.&fenc.']':''} -set statusline+=%* - - -"" Right side of statusline -set statusline+=%= " Left/right separation point -set statusline+=%-15.((%l,%c-%v)\ %) " Line, column, percentage. (20,0) -set statusline+=%P " Percentage visible - -set laststatus=2 " Always show statusline - - - """ " Syntax highlighting " -- cgit v1.2.3-70-g09d2