famiu / feline.nvim

A minimal, stylish and customizable statusline for Neovim written in Lua
GNU General Public License v3.0
1.04k stars 55 forks source link

How can I show the git blame in the status line, and the buffers in tabs? #207

Closed ghost closed 2 years ago

ghost commented 2 years ago

I'm moving from airline to feline and I would like to know how to have the same configuration in feline as I have in airline

Plug 'vim-airline/vim-airline' " Fancy statusline
Plug 'vim-airline/vim-airline-themes' " Themes for vim-airline
let g:airline_powerline_fonts=1
let g:airline_theme='onedark'
let g:airline_section_c = "%{get(b:,'coc_git_blame','')}"
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#tab_min_count = 2
let g:airline#extensions#tabline#show_buffers = 1
let g:airline#extensions#tabline#show_splits = 0
ram02z commented 2 years ago

Just to preface, I have not used airline.

let g:airline_powerline_fonts=1

By default, providers include an icon where possible. If you wanted to change the icon, you can change the icon value. See https://github.com/feline-nvim/feline.nvim/blob/master/USAGE.md#component-icon For separators between providers, you can use one of the presets or set a custom string value. See the default separators, https://github.com/feline-nvim/feline.nvim/blob/master/USAGE.md#separator-presets For separator example, see https://github.com/feline-nvim/feline.nvim/blob/master/USAGE.md#component-separators


let g:airline_theme='onedark'

You can create a new theme using the onedark colors if you aren't happy with the defaults. See https://github.com/feline-nvim/feline.nvim/blob/master/USAGE.md#adding-new-themes


let g:airline_section_c = "%{get(b:,'coc_git_blame','')}"

You can create a custom provider like so:

{
  provider = function()
      return vim.b.coc_git_blame
  end,
  enabled = function()
    return vim.b.coc_git_blame ~= nil
  end
}

let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#tab_min_count = 2
let g:airline#extensions#tabline#show_buffers = 1
let g:airline#extensions#tabline#show_splits = 0

Unforunately, tabline support has not been implemented yet. See #169