Spacevim: No branch info into status line

Created on 12 Mar 2020  ·  6Comments  ·  Source: SpaceVim/SpaceVim

Expected behavior, english is recommend

Open vim in a git repository, I expect to see git branch info in statusline, but nothing shows up.

But, if I press SPC g s to see git status and then q to close git status buffer, the branch info into statusline appears.

Environment Information

  • OS: mac
  • vim version: 8.2.319
  • neovim version: -
  • SpaceVim version: 1.4.0-dev
  • SpaceVim status:
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

The reproduce ways from Vim starting (Required!)

Output of the :SPDebugInfo!

SpaceVim debug information

SpaceVim options :

  auto_disable_touchpad = 1
  autocomplete_method = 'coc'
  autocomplete_parens = 1
  buffer_index_type = 4
  checkinstall = 1
  colorscheme = 'NeoSolarized'
  colorscheme_bg = 'dark'
  colorscheme_default = 'desert'
  commandline_prompt = '➭'
  custom_color_palette = []
  custom_plugins = []
  debug_level = 1
  default_indent = 2
  disabled_plugins = []
  enable_ale = 0
  enable_bepo_layout = 0
  enable_cursorcolumn = 0
  enable_cursorline = 1
  enable_debug = 0
  enable_googlesuggest = 0
  enable_guicolors = 1
  enable_insert_leader = 1
  enable_javacomplete2_py = 0
  enable_key_frequency = 0
  enable_language_specific_leader = 1
  enable_neocomplcache = 0
  enable_neomake = 1
  enable_os_fileformat_icon = 0
  enable_powerline_fonts = 1
  enable_statusline_bfpath = 0
  enable_statusline_mode = 0
  enable_statusline_tag = 1
  enable_tabline_filetype_icon = 1
  enable_tabline_ft_icon = 0
  enable_vimfiler_filetypeicon = 1
  enable_vimfiler_gitstatus = 1
  enable_vimfiler_welcome = 1
  enable_ycm = 0
  error_symbol = '✖'
  expand_tab = 1
  filemanager = 'defx'
  filetree_direction = 'left'
  filetype_icons = {'ex': '', 'exs': '', 'leex': '', 'eex': ''}
  force_global_config = 1
  gitcommit_issue_icon = ''
  gitcommit_pr_icon = ''
  github_username = ''
  guifont = ''
  hiddenfileinfo = 1
  home_files_number = 6
  hosts_url = 'https://raw.githubusercontent.com/racaljk/hosts/master/hosts'
  info_symbol = 'ⓘ'
  keep_server_alive = 1
  language = ''
  leader_guide_default_group_name = ''
  leader_guide_flatten = 1
  leader_guide_hspace = 5
  leader_guide_max_size = 0
  leader_guide_position = 'botright'
  leader_guide_run_map_on_popup = 1
  leader_guide_sort_horizontal = 0
  leader_guide_submode_mappings = {'<C-C>': 'win_close'}
  leader_guide_vertical = 0
  lint_on_save = 1
  lint_on_the_fly = 0
  max_column = 120
  plugin_bundle_dir = '/Users/gigitsu/.cache/vimfiles/'
  plugin_manager = 'dein'
  plugin_manager_processes = 16
  plugin_name = 'vim-gitgutter'
  project_rooter_automatically = 1
  project_rooter_patterns = ['.git/', '_darcs/', '.hg/', '.bzr/', '.svn/', '.SpaceVim.d/']
  realtime_leader_guide = 1
  relativenumber = 1
  search_tools = ['rg', 'ag', 'pt', 'ack', 'grep', 'findstr']
  sidebar_direction = ''
  sidebar_width = 30
  smartcloseignoreft = ['tagbar', 'vimfiler', 'defx', 'SpaceVimRunner', 'SpaceVimREPL', 'SpaceVimQuickFix', 'HelpDescribe', 'VebuggerShell', 'VebuggerTerminal', 'SpaceVimTabsManager']
  smartcloseignorewin = ['__Tagbar__', 'vimfiler:default']
  snippet_engine = 'neosnippet'
  src_root = 'E:\sources\'
  statusline_inactive_separator = 'slant'
  statusline_iseparator = 'nil'
  statusline_left_sections = ['winnr', 'filename', 'version control info', 'minor mode lighters', 'vcs', 'hunks']
  statusline_right_sections = ['fileformat', 'major mode', 'cursorpos', 'percentage']
  statusline_separator = 'slant'
  statusline_unicode_symbols = 1
  terminal_cursor_shape = 2
  todo_labels = ['@fixme', '@question', '@todo', '@idea']
  update_retry_cnt = 3
  version = '1.4.0-dev'
  vim_help_language = 'en'
  vimcompatible = 0
  warning_symbol = '⚠'
  wildignore = '*/tmp/*,*.so,*.swp,*.zip,*.class,tags,*.jpg,*.ttf,*.TTF,*.png,*/target/*,.git,.svn,.hg,.DS_Store,*.svg'
  windows_index_type = 3
  windows_leader = 's'
  windows_smartclose = 'q'

SpaceVim layers :

[[layers]]
  name="autocomplete"
  auto-completion-return-key-behavior='complete'
  auto-completion-tab-key-behavior='smart'
[[layers]]
  name="checkers"
[[layers]]
  name="format"
[[layers]]
  name="edit"
[[layers]]
  name="ui"
[[layers]]
  name="core"
[[layers]]
  name="core#banner"
[[layers]]
  name="core#statusline"
[[layers]]
  name="core#tabline"
[[layers]]
  name="shell"
  default_position='top'
  default_height=30
[[layers]]
  name="colorscheme"
[[layers]]
  name="lang#elixir"
[[layers]]
  name="lsp"
  filetypes=['elixir']
[[layers]]
  name="fuzzy"
[[layers]]
  name="ctrlp"
[[layers]]
  name="VersionControl"
[[layers]]
  name="git"

SpaceVim Health checking :

SpaceVim clipboard support check report:
Checking +clipboard:
SUCCEED!
SpaceVim environment check report:
Current progpath: Vim(/usr/local/Cellar/macvim/8.2-162/MacVim.app/Contents/MacOS/Vim)
version: 802
OS: mac
SpaceVim lua support check report:
Checking +lua:
SUCCEED!
SpaceVim python support check report:
Checking +python3:
SUCCEED!
Checking +python:
Failed : to support +python, Please install vim-gtk, or build from sources.

SpaceVim runtime log :

[ SpaceVim ] : logger file  does not exists, only log for current process will be shown!
[ SpaceVim ] [15:28:48] [ Info ] Startup with directory: ~/Develop/src/github.com/gigitsu/SpaceVim
[ SpaceVim ] [15:28:48] [ Info ] find local conf: /Users/gigitsu/Develop/src/github.com/gigitsu/SpaceVim/.SpaceVim.d/init.vim
[ SpaceVim ] [15:28:48] [ Info ] force loadding global config >>>
[ SpaceVim ] [15:28:48] [ Info ] start to apply config [glob]
[ SpaceVim ] [15:28:48] [ Warn ] Failed to find the lsp server command for elixir
[ SpaceVim ] [15:28:48] [ Info ] SpaceVim server startup at:/tmp/spacevim_vim_server
[ SpaceVim ] [15:28:49] [ Info ] Start to find root for: /Users/gigitsu/Develop/src/github.com/gigitsu/SpaceVim/
[ SpaceVim ] [15:28:49] [ Info ]         (.git/):/Users/gigitsu/Develop/src/github.com/gigitsu/SpaceVim
[ SpaceVim ] [15:28:49] [ Info ]         (.SpaceVim.d/):/Users/gigitsu/Develop/src/github.com/gigitsu/SpaceVim
[ SpaceVim ] [15:28:49] [ Info ] buffer name: .
[ SpaceVim ] [15:28:49] [ Info ] change to root: /Users/gigitsu/Develop/src/github.com/gigitsu/SpaceVim
[ SpaceVim ] [15:28:49] [ Info ] try to open SpaceVim welcome page
[ SpaceVim ] [15:28:50] [ Info ] Start to find root for: /Users/gigitsu/Develop/src/github.com/gigitsu/SpaceVim/
[ SpaceVim ] [15:28:50] [ Info ]         (.git/):/Users/gigitsu/Develop/src/github.com/gigitsu/SpaceVim
[ SpaceVim ] [15:28:50] [ Info ]         (.SpaceVim.d/):/Users/gigitsu/Develop/src/github.com/gigitsu/SpaceVim
[ SpaceVim ] [15:28:50] [ Info ] buffer name: 
[ SpaceVim ] [15:28:50] [ Info ] change to root: /Users/gigitsu/Develop/src/github.com/gigitsu/SpaceVim
[ SpaceVim ] [15:28:52] [ Info ] Start to find root for: /private/var/folders/yq/cft84x6551dfdzzhy0q7pqyh0000gn/T/vgky2VY/3/issue_report.md
[ SpaceVim ] [15:28:52] [ Info ] buffer name: /var/folders/yq/cft84x6551dfdzzhy0q7pqyh0000gn/T/vgky2VY/3/issue_report.md
[ SpaceVim ] [15:28:52] [ Info ] change to root: /Users/gigitsu/Develop/src/github.com/gigitsu/SpaceVim

Screenshots

If you have any screenshots for this issue please upload here. BTW you can use https://asciinema.org/ for recording video in terminal.

no-reproduce

Most helpful comment

The problem is on gina plugin.
Branch is shown immediately after setting fugitive plugin.

[[layers]]
  name = "git"
  git-plugin = "fugitive"

All 6 comments

I can not reproduce it. make sure git and VersionControl layer has been loaded, and you can check the result of :echo git#branch#current(), this should print the branch info.

Thank you for the response. I've loaded the git and VersionControl layers, this is my configuration:

#=============================================================================
# dark_powered.toml --- dark powered configuration example for SpaceVim
# Copyright (c) 2016-2017 Wang Shidong & Contributors
# Author: Wang Shidong < wsdjeg at 163.com >
# URL: https://spacevim.org
# License: GPLv3
#=============================================================================

# All SpaceVim option below [option] section
[options]
    # set spacevim theme. by default colorscheme layer is not loaded,
    # if you want to use more colorscheme, please load the colorscheme
    # layer
    colorscheme = "NeoSolarized"
    colorscheme_bg = "dark"
    # Disable guicolors in basic mode, many terminal do not support 24bit
    # true colors
    enable_guicolors = true
    # Disable statusline separator, if you want to use other value, please
    # install nerd fonts
    statusline_separator = "slant"
    statusline_inactive_separator = "slant"
    buffer_index_type = 4
    enable_tabline_filetype_icon = true
    autocomplete_method = "coc"
    filetree_direction = "left"
    enable_vimfiler_filetypeicon = true
    enable_vimfiler_gitstatus = true
    filemanager = "defx"
    statusline_left_sections = [
      'winnr',
      'filename',
      'version control info',
      'minor mode lighters',
    ]
    statusline_right_sections = [
      'fileformat',
      'major mode',
      'cursorpos',
      'percentage'
    ]

# Enable autocomplete layer
[[layers]]
name = 'autocomplete'
auto-completion-return-key-behavior = "complete"
auto-completion-tab-key-behavior = "smart"

[[layers]]
name = 'shell'
default_position = 'top'
default_height = 30

[[layers]]
  name = "colorscheme"

[[layers]]
  name = "lang#elixir"

[[layers]]
  name = "fuzzy"

[[layers]]
  name = "ctrlp"

[[layers]]
  name = "VersionControl"

[[layers]]
  name = "git"

[[custom_plugins]]
    name = "roxma/nvim-yarp"
    merged = false

[[custom_plugins]]
    name = "roxma/vim-hug-neovim-rpc"
    merged = false

The :echo git#branch#current() actually print out the branch where I am and then, after I've issued that command, the branch info starts appears in the status bar

  • I have already loaded git and VersionControl layers, but the branch info didn't shown in statusline automatically.
  • And if I press SPC g s to see git status and then q to close git status buffer, the branch info into statusline appears.
  • And the branch info will not change when I change dir.
  • Maybe there is some error in VersionControl.vim

The problem is on gina plugin.
Branch is shown immediately after setting fugitive plugin.

[[layers]]
  name = "git"
  git-plugin = "fugitive"

Switching to fugitive did the trick, thank you.

in git layer, if you do not setting the git_plugin option, git.vim is used by default. it should work well in neovim.

I also test in gvim8.1, it works well for me.

Was this page helpful?
0 / 5 - 0 ratings