1
0
Fork 0

replace lightline-buffer with lightline-bufferline

This commit is contained in:
Massaki Archambault 2018-07-04 09:40:42 -04:00
parent f0f578efe8
commit 50be442ef2
1 changed files with 25 additions and 17 deletions

View File

@ -5,6 +5,8 @@ syntax on
set number
" highlight
set cursorline
" Encoding
set encoding=UTF-8
" Auto-indentation
set ai
set tabstop=4
@ -58,7 +60,8 @@ if dein#load_state(pluginpath)
" Interface
call dein#add("itchyny/lightline.vim")
call dein#add('taohex/lightline-buffer')
call dein#add('mgee/lightline-bufferline')
call dein#add('ryanoasis/vim-devicons')
call dein#add("airblade/vim-gitgutter")
call dein#add("christoomey/vim-tmux-navigator")
call dein#add("scrooloose/nerdtree")
@ -144,18 +147,12 @@ let g:lightline = {
\ [ 'linter_errors' ],
\ [ 'fileformat', 'fileencoding', 'filetype', 'linter_ok', 'linter_warnings' ] ],
\ },
\ 'tabline': {
\ 'left': [ [ 'bufferinfo' ], [ 'bufferbefore', 'buffercurrent', 'bufferafter' ], ],
\ 'right': [ ],
\ },
\ 'component_expand': {
\ 'buffercurrent': 'lightline#buffer#buffercurrent2',
\ 'linter_warnings': 'LightlineLinterWarnings',
\ 'linter_errors': 'LightlineLinterErrors',
\ 'linter_ok': 'LightlineLinterOK'
\ },
\ 'component_type': {
\ 'buffercurrent': 'tabsel',
\ 'readonly': 'error',
\ 'linter_errors': 'error',
\ 'linter_warning': 'warning',
@ -163,12 +160,21 @@ let g:lightline = {
\ 'component_function': {
\ 'filename': 'LightlineFilename',
\ 'ctrlpmark': 'CtrlPMark',
\ 'bufferbefore': 'lightline#buffer#bufferbefore',
\ 'bufferafter': 'lightline#buffer#bufferafter',
\ 'bufferinfo': 'lightline#buffer#bufferinfo',
\ },
\ }
"lightline-bufferline
let g:lightline#bufferline#show_number=2
let g:lightline#bufferline#number_map = {
\ 0: '⁰', 1: '¹', 2: '²', 3: '³', 4: '⁴',
\ 5: '⁵', 6: '⁶', 7: '⁷', 8: '⁸', 9: '⁹'
\ }
let g:lightline#bufferline#enable_devicons=1
let g:lightline#bufferline#min_buffer_count=2
let g:lightline.tabline = {'left': [['buffers']], 'right': []}
let g:lightline.component_expand = {'buffers': 'lightline#bufferline#buffers'}
let g:lightline.component_type = {'buffers': 'tabsel'}
function! LightlineFilename()
let filename = expand('%:t') !=# '' ? expand('%:t') : '[No Name]'
let modified = &modified ? ' +' : ''
@ -219,9 +225,11 @@ endfunction
colorscheme spacegray
" 16 millions colors
"set termguicolors
" Disable background
"hi Normal guibg=NONE ctermbg=NONE
let g:spacegray_underline_search = 1
" Disable background in terminal
hi Normal ctermbg=NONE
" Those don't seem to do anything in xterm
"let g:spacegray_underline_search = 1
"let g:spacegray_italicize_comments = 1
" Italic comments