Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/delphinus/lightline-delphinus

Yet another theme for lightline
https://github.com/delphinus/lightline-delphinus

vim

Last synced: about 2 months ago
JSON representation

Yet another theme for lightline

Awesome Lists containing this project

README

        

# Yet another theme for lightline

## What is this?

This theme is for [lightline][] that is a statusline plugin for Vim. This has features below.

* Additional components for lightline
- Support [ALE (Asynchronous Lint Engine)][ale]
- Support Powerline icons **(optional)**
- Support [majutsushi/tagbar][tagbar] to show function names **(optional)**
- Support [airblade/vim-gitgutter][vim-gitgutter] / [mhinz/vim-signify][vim-signify] to show diff status **(optional)**
* Improved colorscheme for lightline to fit with [Solarized][] & [Nord][nord-vim] colorschemes

[lightline]: https://github.com/itchyny/lightline.vim
[devicons]: https://github.com/ryanoasis/vim-devicons
[ale]: https://github.com/dense-analysis/ale
[Solarized]: http://ethanschoonover.com/solarized/vim-colors-solarized

## Themes

* For Solarized Dark (best match for [vim-solarized8][])
2017-11-07 9 15 59
2017-11-07 9 16 32
2017-11-07 9 16 48
2017-11-07 9 17 03

* For Solarized Light (best match for [vim-solarized8][])
2017-11-07 9 17 20
2017-11-07 9 17 35
2017-11-07 9 17 53
2017-11-07 9 18 05

* For Nord ([nord-vim][])
2017-11-07 9 19 09
2017-11-07 9 19 30
2017-11-07 9 19 59
2017-11-07 9 20 13

[vim-solarized8]: https://github.com/lifepillar/vim-solarized8
[nord-vim]: https://github.com/arcticicestudio/nord-vim

## Install

### for [dein.vim][dein]

#### Basic setting

```vim
call dein#add('delphinus/lightline-delphinus')
call dein#add('itchyny/lightline.vim')

" optional
call dein#add('ryanoasis/vim-devicons')
call dein#add('dense-analysis/ale')
call dein#add('majutsushi/tagbar')
call dein#add('airblade/vim-gitgutter')
call dein#add('mhinz/vim-signify')
```

#### TOML setting

```toml
[[plugins]]
repo = 'delphinus/lightline-delphinus'

[[plugins]]
repo = 'itchyny/lightline.vim'

# optional
[[plugins]]
repo = 'ryanoasis/vim-devicons'

[[plugins]]
repo = 'dense-analysis/ale'

[[plugins]]
repo = 'majutsushi/tagbar'
```

[dein]: https://github.com/Shougo/dein.vim

### for other plugin managers

**TODO**

## other setting

### `g:lightline_delphinus_use_powerline_glyphs`

If true, it uses glyphs for [Powerline][]. You should use this options with fonts from [powerline-fonts][] or natively supported ones such as [Iosevka][].

[Powerline]: https://github.com/powerline/powerline
[powerline-fonts]: https://github.com/powerline/fonts
[Iosevka]: https://be5invis.github.io/Iosevka/

### `g:lightline_delphinus_use_nerd_fonts_glyphs`

If true, it uses glyphs for [nerd-fonts][]. You should use this options with [patched fonts][].

[nerd-fonts]: https://github.com/ryanoasis/nerd-fonts
[patched fonts]: https://github.com/ryanoasis/nerd-fonts#patched-fonts

### `g:lightline_delphinus_colorscheme`

Can be set `solarized_improved` (Default) or `nord_improved`.

### `g:lightline_delphinus_tagbar_enable`

Enable tagbar feature. See below.

### `g:lightline_delphinus_gitgutter_enable`

Enable gitgutter feature. See below.

Can be set `solarized_improved` (Default) or `nord_improved`.

## ALE setting (optional)

If you want to use neat glyphs statusline for ALE, you should add some settings for ALE. Below is an example that I used in capturing GIF above.

```vim
" nr2char(...) is for describing icons from devicons
let g:ale_echo_msg_error_str = nr2char(0xf421) . ' '
let g:ale_echo_msg_warning_str = nr2char(0xf420) . ' '
let g:ale_echo_msg_info_str = nr2char(0xf05a) . ' '
let g:ale_echo_msg_format = '%severity% %linter% - %s'
let g:ale_sign_column_always = 1
let g:ale_sign_error = g:ale_echo_msg_error_str
let g:ale_sign_warning = g:ale_echo_msg_warning_str
let g:ale_statusline_format = [
\ g:ale_echo_msg_error_str . ' %d',
\ g:ale_echo_msg_warning_str . ' %d',
\ nr2char(0xf4a1) . ' ']
```

## tagbar setting (optional)

lightline-delphinus can detect installed [tagbar][] and show function names on cursor by `tagbar#current()`. The info from tagbar will be updated once per second at the maximum.

Set `let g:lightline_delphinus_tagbar_enable = 1` to enable this.

[tagbar]: https://github.com/majutsushi/tagbar

2018-07-12 14 22 05

## gitgutter setting (optional)

lightline-delphinus can detect installed [vim-gitgutter][] and show diff info calculated from `gitgutter#hunk#hunks()`.

Set `let g:lightline_delphinus_gitgutter_enable = 1` to enable this.

[vim-gitgutter]: https://github.com/airblade/vim-gitgutter

2018-10-27 10 43 47

## signify setting (optional)

lightline-delphinus can detect installed [vim-signify][] and show diff info calculated from `sy#repo#get_stats()`.

Set `let g:lightline_delphinus_signify_enable = 1` to enable this.

[vim-signify]: https://github.com/mhinz/vim-signify

スクリーンショット 0001-10-03 17 58 40

## Contribution

The colorscheme's are formerly generated because the sources are a bit complicated and take long time to be evaluated in Vim.

* source: `autoload/lightline/delphinus/colorscheme/nord_improved.vim`
* generated: `autoload/lightline/colorscheme/nord_improved.vim`

So you should not edit the colorscheme's directly. You should edit the sources, and run the script to generate.

```sh
# edit the source
vim autoload/lightline/delphinus/colorscheme/nord_improved.vim
# run the script
# this needs Python 3.6+
bin/dump.py
```