Skip to content

Commit

Permalink
feat(neuline): add neuims status to tabline; shorten asyncrun status …
Browse files Browse the repository at this point in the history
…messages
  • Loading branch information
neur1n committed Jan 21, 2020
1 parent 3f87a21 commit ff8c961
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions neovim/configs/plugin_conf/neuline.vim
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ let g:neuline = {
\ },
\ 'tal': {
\ 'left': ['logo', 'bufinfo', 'asyncrun'],
\ 'right': ['ctab', 'nctab', 'button'],
\ 'right': ['neuims', 'ctab', 'nctab', 'button'],
\ 'definition': {
\ 'asyncrun': {'tag': 'NTasyncrun', 'def': ['NeulineAsyncRun()']},
\ 'neuims': {'tag': 'NTneuims', 'def': ['NeulineNeuIMS()']},
\ }
\ },
\ }
Expand Down Expand Up @@ -130,13 +131,13 @@ function! NeulineAsyncRun() abort
return ''
elseif l:status ==# 'failure'
highlight link NTasyncrun NTasyncrunE
return '[AsyncRun] Failed '
return '[AsyncRun] ✘'
elseif l:status ==# 'running'
highlight link NTasyncrun NTasyncrunR
return '[AsyncRun] Running '
return '[AsyncRun] '
elseif l:status ==# 'success'
highlight link NTasyncrun NTasyncrunF
return '[AsyncRun] Finished '
return '[AsyncRun] ✓'
endif
endif

Expand All @@ -151,4 +152,23 @@ augroup neuline_custom
autocmd User AsyncRunStop call neutal#Update() | call neuline#tal#highlight#Link()
augroup end
"}}}
"******************************************************************** neuims{{{
call neutil#palette#Highlight('NTneuims', s:plt.yellow, s:plt.grays, 'bold')

function! NeulineNeuIMS() abort
if winwidth(0) >= 60
if exists('g:neuims')
if g:neuims.status == 1
return ' '.g:neuims.im.' '
else
return ''
endif
else
return ''
endif
else
return ''
endif
endfunction
"}}}
"}}}

0 comments on commit ff8c961

Please sign in to comment.