dotfiles/nvim/autoload/airline/extensions/dotfiles_tweaks.vim
Dmytro Meleshko ca5544566a [nvim] make various airline setup improvements
1. List the extensions I use explicitly.
2. Use the `iminsert` part instead of `keymap` as it shows the short
   code from `b:keymap_name`.
3. Move the file size display part into its own "extension".
4. Update the file size part on-the-fly by using `wordcount()` not more
   frequently than 2 seconds.
5. Abuse the extension system for tweaking `maxlinenr` and `colnr`, and
   also read their real definitions.

Pretty cool, am I right?
2021-05-16 15:18:43 +03:00

11 lines
425 B
VimL

function! airline#extensions#dotfiles_tweaks#init(ext) abort
" Undo this commit a little bit:
" <https://github.com/vim-airline/vim-airline/commit/8929bc72a13d358bb8369443386ac3cc4796ca16>
call airline#parts#define('maxlinenr', {
\ 'raw': trim(airline#parts#get('maxlinenr').raw),
\ })
call airline#parts#define('colnr', {
\ 'raw': trim(airline#parts#get('colnr').raw),
\ 'accent': 'none',
\ })
endfunction