mirror of
https://github.com/vim-airline/vim-airline.git
synced 2026-07-30 20:02:54 +08:00
add linediff extension (#2757)
This commit is contained in:
@@ -541,6 +541,11 @@ function! airline#extensions#load()
|
||||
call add(s:loaded_ext, 'zhihu')
|
||||
endif
|
||||
|
||||
if (get(g:, 'airline#extensions#linediff#enabled', 1) && exists('g:loaded_linediff'))
|
||||
call airline#extensions#linediff#init(s:ext)
|
||||
call add(s:loaded_ext, 'linediff')
|
||||
endif
|
||||
|
||||
endfunction
|
||||
|
||||
function! airline#extensions#get_loaded_extensions()
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
" MIT License. Copyright (c) 2026 Shad
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
scriptencoding utf-8
|
||||
|
||||
function! airline#extensions#linediff#init(ext)
|
||||
call a:ext.add_statusline_func('airline#extensions#linediff#apply')
|
||||
endfunction
|
||||
|
||||
function! airline#extensions#linediff#apply(...)
|
||||
if exists('b:differ.description')
|
||||
let w:airline_section_c = b:differ.description
|
||||
endif
|
||||
endfunction
|
||||
@@ -917,6 +917,12 @@ LanguageClient <https://github.com/autozimu/LanguageClient-neovim>
|
||||
* languageclient close_lnum_symbol >
|
||||
let g:airline#extensions#languageclient#close_lnum_symbol = ')'
|
||||
|
||||
------------------------------------- *airline-linediff*
|
||||
linediff.vim <https://github.com/AndrewRadev/linediff.vim>
|
||||
|
||||
* enable/disable linediff buffername and position integration >
|
||||
let g:airline#extensions#linediff#enabled = 1
|
||||
|
||||
------------------------------------- *airline-localsearch*
|
||||
localsearch <https://github.com/mox-mox/vim-localsearch>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user