1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 14:00:05 +08:00

Improve statusline support for gina (#2432)

* Improve statusline support for gina

* Fix codecov

* Add support for gina diff/commit statusline
This commit is contained in:
Wang Shidong 2019-01-07 23:12:49 +08:00 committed by GitHub
parent 00be7d92ba
commit b1218c3ac0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -342,6 +342,15 @@ function! SpaceVim#layers#core#statusline#get(...) abort
\ . s:winnr(1) . '%#SpaceVim_statusline_ia_SpaceVim_statusline_b#'
\ . s:lsep
\ . '%#SpaceVim_statusline_b# Gista %#SpaceVim_statusline_b_SpaceVim_statusline_c#' . s:lsep . ' '
elseif &filetype ==# 'gina-status'
return '%#SpaceVim_statusline_ia#' . s:winnr(1) . '%#SpaceVim_statusline_ia_SpaceVim_statusline_b#' . s:lsep
\ . '%#SpaceVim_statusline_b# Gina status %#SpaceVim_statusline_b_SpaceVim_statusline_c#' . s:lsep . ' '
elseif &filetype ==# 'gina-commit'
return '%#SpaceVim_statusline_ia#' . s:winnr(1) . '%#SpaceVim_statusline_ia_SpaceVim_statusline_b#' . s:lsep
\ . '%#SpaceVim_statusline_b# Gina commit %#SpaceVim_statusline_b_SpaceVim_statusline_c#' . s:lsep . ' '
elseif &filetype ==# 'diff' && bufname('%') =~ '^gina://'
return '%#SpaceVim_statusline_ia#' . s:winnr(1) . '%#SpaceVim_statusline_ia_SpaceVim_statusline_b#' . s:lsep
\ . '%#SpaceVim_statusline_b# Gina diff %#SpaceVim_statusline_b_SpaceVim_statusline_c#' . s:lsep . ' '
elseif &filetype ==# 'nerdtree'
return '%#SpaceVim_statusline_ia#' . s:winnr(1) . '%#SpaceVim_statusline_ia_SpaceVim_statusline_b#' . s:lsep
\ . '%#SpaceVim_statusline_b# Nerdtree %#SpaceVim_statusline_b_SpaceVim_statusline_c#' . s:lsep . ' '

View File

@ -10,7 +10,8 @@ coverage:
project:
default: false # disable the default status that measures entire project
api: # declare a new status context "api"
target: 35% # we always want 100% coverage here
target: 35% # we always want 35% coverage here
paths: "autoload/SpaceVim/api/" # only include coverage in "autoload/SpaceVim/api/" folder
all: # declare a new status context "all"
target: 35% # we always want 35% coverage here
paths: "!tests/" # remove all files in "tests/"