mirror of
https://github.com/prurigro/darkcloud-nvimconfig.git
synced 2024-11-13 16:32:30 -05:00
Fix some issues in lightline and improve the colours a bit
This commit is contained in:
parent
0b76cff0d3
commit
85a89212c5
1 changed files with 36 additions and 39 deletions
|
@ -13,7 +13,7 @@ function! LLFilename()
|
||||||
let fname = expand('%:t')
|
let fname = expand('%:t')
|
||||||
|
|
||||||
return
|
return
|
||||||
\ fname == '__Tagbar__' ? g:lightline.fname :
|
\ fname == '__Tagbar__.1' ? g:lightline.fname :
|
||||||
\ &ft == 'vimfiler' ? vimfiler#get_status_string() :
|
\ &ft == 'vimfiler' ? vimfiler#get_status_string() :
|
||||||
\ &ft == 'unite' ? unite#get_status_string() :
|
\ &ft == 'unite' ? unite#get_status_string() :
|
||||||
\ &ft == 'qf' ? '[Error/Location List]' :
|
\ &ft == 'qf' ? '[Error/Location List]' :
|
||||||
|
@ -24,15 +24,13 @@ function! LLFilename()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! LLFugitive()
|
function! LLFugitive()
|
||||||
try
|
if expand('%:t') !~? 'Tagbar' && &ft !~? 'vimfiler' && exists('*FugitiveHead')
|
||||||
if expand('%:t') !~? 'Tagbar' && &ft !~? 'vimfiler' && exists('*fugitive#head')
|
let mark = '' "edit here for cool mark
|
||||||
let mark = '' "edit here for cool mark
|
let _ = FugitiveHead()
|
||||||
let _ = fugitive#head()
|
return strlen(_) ? mark._ : ''
|
||||||
return strlen(_) ? mark._ : ''
|
else
|
||||||
endif
|
|
||||||
catch
|
|
||||||
return ''
|
return ''
|
||||||
endtry
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! LLFileformat()
|
function! LLFileformat()
|
||||||
|
@ -63,45 +61,46 @@ function! TagbarStatusFunc(current, sort, fname, ...) abort
|
||||||
return lightline#statusline(0)
|
return lightline#statusline(0)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
let g:lightline = {}
|
let g:lightline = {
|
||||||
|
\ 'colorscheme': 'darkcloud',
|
||||||
let g:lightline.colorscheme = 'darkcloud'
|
\
|
||||||
let g:lightline#ale#indicator_checking = ""
|
\ 'component_function': {
|
||||||
let g:lightline#ale#indicator_warnings = "W:"
|
|
||||||
let g:lightline#ale#indicator_errors = "E:"
|
|
||||||
let g:lightline#ale#indicator_ok = "OK"
|
|
||||||
|
|
||||||
let g:lightline.component_function = {
|
|
||||||
\ 'fugitive': 'LLFugitive',
|
\ 'fugitive': 'LLFugitive',
|
||||||
\ 'filename': 'LLFilename',
|
\ 'filename': 'LLFilename',
|
||||||
\ 'fileformat': 'LLFileformat',
|
\ 'fileformat': 'LLFileformat',
|
||||||
\ 'filetype': 'LLFiletype',
|
\ 'filetype': 'LLFiletype',
|
||||||
\ 'fileencoding': 'LLFileencoding',
|
\ 'fileencoding': 'LLFileencoding',
|
||||||
\ 'mode': 'LLMode'
|
\ 'mode': 'LLMode'
|
||||||
\ }
|
\ },
|
||||||
|
\
|
||||||
let g:lightline.component_expand = {
|
\ 'component_expand': {
|
||||||
\ 'linter_checking': 'lightline#ale#checking',
|
\ 'linter_checking': 'lightline#ale#checking',
|
||||||
\ 'linter_warnings': 'lightline#ale#warnings',
|
\ 'linter_warnings': 'lightline#ale#warnings',
|
||||||
\ 'linter_errors': 'lightline#ale#errors',
|
\ 'linter_errors': 'lightline#ale#errors',
|
||||||
\ 'linter_ok': 'lightline#ale#ok'
|
\ 'linter_ok': 'lightline#ale#ok'
|
||||||
\ }
|
\ },
|
||||||
|
\
|
||||||
let g:lightline.component_type = {
|
\ 'component_type': {
|
||||||
\ 'linter_checking': 'left',
|
\ 'linter_checking': 'left',
|
||||||
\ 'linter_warnings': 'warning',
|
\ 'linter_warnings': 'warning',
|
||||||
\ 'linter_errors': 'error',
|
\ 'linter_errors': 'error',
|
||||||
\ 'linter_ok': 'left'
|
\ 'linter_ok': 'left'
|
||||||
\ }
|
\ },
|
||||||
|
\
|
||||||
let g:lightline.component = {
|
\ 'component': {
|
||||||
\ 'tagbar': '%{tagbar#currenttag("[%s]", "", "f")}'
|
\ 'tagbar': '%{tagbar#currenttag("[%s]", "", "f")}'
|
||||||
\ }
|
\ },
|
||||||
|
\
|
||||||
let g:lightline.active = {
|
\ 'active': {
|
||||||
\ 'left': [[ 'mode', 'paste' ], [ 'fugitive', 'filename' ], [ 'tagbar' ]],
|
\ 'left': [[ 'mode', 'paste' ], [ 'fugitive', 'filename' ], [ 'tagbar' ]],
|
||||||
\ 'right': [[ 'linter_checking', 'linter_errors', 'linter_warnings', 'linter_ok' ], [ 'fileformat', 'fileencoding', 'filetype' ], [ 'lineinfo', 'percent' ]]
|
\ 'right': [[ 'linter_checking', 'linter_errors', 'linter_warnings', 'linter_ok' ], [ 'fileformat', 'fileencoding', 'filetype' ], [ 'lineinfo', 'percent' ]]
|
||||||
\ }
|
\ }
|
||||||
|
\ }
|
||||||
|
|
||||||
|
let g:lightline#ale#indicator_checking = ""
|
||||||
|
let g:lightline#ale#indicator_warnings = "W:"
|
||||||
|
let g:lightline#ale#indicator_errors = "E:"
|
||||||
|
let g:lightline#ale#indicator_ok = "OK"
|
||||||
|
|
||||||
"status bar config with and without powerline fonts (default: 0)
|
"status bar config with and without powerline fonts (default: 0)
|
||||||
if !exists("g:powerlinefonts")
|
if !exists("g:powerlinefonts")
|
||||||
|
@ -131,19 +130,17 @@ endif
|
||||||
|
|
||||||
let s:p = { 'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {} }
|
let s:p = { 'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {} }
|
||||||
|
|
||||||
let s:p.normal.left = [[ s:bcol, s:base1 ], [ s:base6, s:base0 ]]
|
let s:p.normal.right = [[ s:base5, s:base0 ], [ s:base6, s:base1 ], [ s:base5, s:base0 ]]
|
||||||
let s:p.normal.right = [[ s:base4, s:base1 ], [ s:base6, s:base0 ]]
|
let s:p.normal.left = [[ s:bcol, s:base0 ], [ s:base6, s:base1 ]]
|
||||||
let s:p.inactive.left = [[ s:base6, s:base0 ], [ s:base4, s:base1 ]]
|
let s:p.insert.left = [[ s:rcol, s:base1 ], [ s:base5, s:base0 ]]
|
||||||
let s:p.inactive.right = [[ s:base4, s:base1 ], [ s:base6, s:base0 ]]
|
let s:p.replace.left = [[ s:base1, s:rcol ], [ s:base5, s:base0 ]]
|
||||||
let s:p.insert.left = [[ s:rcol, s:base1 ], [ s:base6, s:base0 ]]
|
let s:p.visual.left = [[ s:ycol, s:base1 ], [ s:base5, s:base0 ]]
|
||||||
let s:p.replace.left = [[ s:base1, s:rcol ], [ s:base6, s:base0 ]]
|
|
||||||
let s:p.visual.left = [[ s:ycol, s:base1 ], [ s:base6, s:base0 ]]
|
|
||||||
|
|
||||||
let s:p.normal.middle = [[ s:base4, s:base1 ]]
|
let s:p.normal.middle = [[ s:base6, s:base1 ]]
|
||||||
let s:p.inactive.abmiddle = [[ s:base3, s:base1 ]]
|
let s:p.inactive.abmiddle = [[ s:base3, s:base1 ]]
|
||||||
let s:p.tabline.left = [[ s:base5, s:base0 ]]
|
let s:p.tabline.left = [[ s:base5, s:base0 ]]
|
||||||
let s:p.tabline.tabsel = [[ s:base5, s:base1 ]]
|
let s:p.tabline.tabsel = [[ s:base5, s:base1 ]]
|
||||||
let s:p.tabline.middle = [[ s:base0, s:base4 ]]
|
let s:p.tabline.middle = [[ s:base0, s:base5 ]]
|
||||||
let s:p.tabline.right = copy(s:p.normal.right)
|
let s:p.tabline.right = copy(s:p.normal.right)
|
||||||
let s:p.normal.error = [[ s:rcol, s:base1 ]]
|
let s:p.normal.error = [[ s:rcol, s:base1 ]]
|
||||||
let s:p.normal.warning = [[ s:ycol, s:base1 ]]
|
let s:p.normal.warning = [[ s:ycol, s:base1 ]]
|
||||||
|
|
Loading…
Reference in a new issue