Skip to content

novadev94/lightline-onedark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

lightline-onedark

This is an itchyny/lightline.vim theme for joshdick/onedark.vim with extra support for bling/bufferline.vim integration.

All the used color codes are extracted from the original joshdick/onedark.vim theme, so the appearance should look consistent.

Screenshot

onedark

Installation

  1. You can install this manually by putting it under $VIM folder or using any package manager of your choice (vim-plug, Vundle, Pathogen, NeoBundle,...)

  2. Add this theme to your lightline configuration in your .vimrc using the theme name onedark.

  • If you haven't had your customized lightline configuration yet
let g:lightline.colorscheme = 'onedark'
  • If you've already had one
let g:lightline = {
  \ 'colorscheme': 'onedark',
  \
}

Configuration

Available Options

  • g:lightline#onedark#disable_bold_style (Default - 0): Do not use bold style.

bufferline.vim integration

Some customizations are also added to support integration with bling/bufferline.vim. Other than the default tabsel, you can use bufsel (selected buffer) and tabsep (separator between tabs & buffers) in your lightline component_type.

See Example for more details.

Example

This is extracted from my own .vimrc. This also shows the integration with bufferline.

If you have some problems of buffers on tab line not switching properly. Please checkout my fork here NovaDev94/bufferline.

let g:bufferline_echo = 0
let g:bufferline_modified = ''
let g:bufferline_show_bufnr = 0
let g:bufferline_unnamed_buffer = '[No Name]'
let g:bufferline_separator = ' '
let g:bufferline_active_buffer_left = ''
let g:bufferline_active_buffer_right = ''

let g:lightline =
  \ {
  \   'colorscheme': 'onedark',
  \   'tabline': {
  \     'left': [ [ 'tabs', 'tablinesep', 'bufferline'] ],
  \     'right': [ [ 'folder' ] ]
  \   },
  \   'tab': {
  \     'active': [ 'tabnum' ],
  \     'inactive': [ 'tabnum' ]
  \   },
  \   'component_expand': {
  \     'bufferline': 'MyBufferline',
  \     'tablinesep': 'MyTablineSep'
  \   },
  \   'component_type': {
  \     'bufferline': 'bufsel',
  \     'tablinesep': 'tabsep'
  \   },
  \   'tabline_subseparator': { 'left': '', 'right': '' },
  \   'tabline_separator': { 'left': '', 'right': '' },
  \ }

function! MyTablineSep()
  return tabpagenr('$') > 1 ? ['', '', ''] : ''
endfunction

function! MyBufferline()
  call bufferline#refresh_status()
  let buffers = [
    \   g:bufferline_status_info.before,
    \   g:bufferline_status_info.current,
    \   g:bufferline_status_info.after
    \ ]
  call map(buffers, 's:strip(v:val)')
  return buffers
endfunction

About

A lightline.vim theme for onedark.vim colorscheme

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published