mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-06 12:14:24 +08:00
coc: Show the current function in section_x
coc.nvim exposes the name of the function the cursor is currently in through b:coc_current_function. For this to work, the key coc.preferences.currentFunctionSymbolAutoUpdate must be set to 'true' in the coc config. The value is only updated on CursorHold, so the value may not always be accurate when moving around.
This commit is contained in:
@@ -34,7 +34,7 @@ describe 'init sections'
|
||||
end
|
||||
|
||||
it 'section x should be filetype'
|
||||
Expect g:airline_section_x == '%{airline#util#prepend("",0)}%{airline#util#prepend("",0)}%{airline#util#prepend("",0)}%{airline#util#prepend("",0)}%{airline#util#prepend("",0)}%{airline#util#wrap(airline#parts#filetype(),0)}'
|
||||
Expect g:airline_section_x == '%#__accent_bold#%#__restore__#%{airline#util#prepend("",0)}%{airline#util#prepend("",0)}%{airline#util#prepend("",0)}%{airline#util#prepend("",0)}%{airline#util#prepend("",0)}%{airline#util#wrap(airline#parts#filetype(),0)}'
|
||||
end
|
||||
|
||||
it 'section y should be fenc and ff'
|
||||
@@ -81,6 +81,7 @@ describe 'init sections'
|
||||
Expect airline#parts#get('languageclient_error_count').raw == ''
|
||||
Expect airline#parts#get('languageclient_warning_count').raw == ''
|
||||
Expect airline#parts#get('coc_status').raw == ''
|
||||
Expect airline#parts#get('coc_current_function').raw == ''
|
||||
Expect airline#parts#get('vista').raw == ''
|
||||
Expect airline#parts#get('coc_warning_count').raw == ''
|
||||
Expect airline#parts#get('coc_error_count').raw == ''
|
||||
|
||||
Reference in New Issue
Block a user