mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-22 22:08:50 +08:00
plugin: Add extension for codeium
closes #2653 Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
parent
0adefd0c42
commit
3854429d99
|
@ -420,6 +420,11 @@ function! airline#extensions#load()
|
||||||
call add(s:loaded_ext, 'capslock')
|
call add(s:loaded_ext, 'capslock')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if (get(g:, 'airline#extensions#codeium#enabled', 1) && get(g:, 'loaded_codeium', 0))
|
||||||
|
call airline#extensions#codeium#init(s:ext)
|
||||||
|
call add(s:loaded_ext, 'codeium')
|
||||||
|
endif
|
||||||
|
|
||||||
if (get(g:, 'airline#extensions#gutentags#enabled', 1) && get(g:, 'loaded_gutentags', 0))
|
if (get(g:, 'airline#extensions#gutentags#enabled', 1) && get(g:, 'loaded_gutentags', 0))
|
||||||
call airline#extensions#gutentags#init(s:ext)
|
call airline#extensions#gutentags#init(s:ext)
|
||||||
call add(s:loaded_ext, 'gutentags')
|
call add(s:loaded_ext, 'gutentags')
|
||||||
|
|
17
autoload/airline/extensions/codeium.vim
Normal file
17
autoload/airline/extensions/codeium.vim
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
" MIT License. Copyright (c) 2014-2021 Mathias Andersson et al.
|
||||||
|
" Plugin: https://github.com/Exafunction/codeium.vim
|
||||||
|
" vim: et ts=2 sts=2 sw=2
|
||||||
|
|
||||||
|
scriptencoding utf-8
|
||||||
|
|
||||||
|
if !get(g:, 'loaded_codeium', 0)
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
function! airline#extensions#codeium#status() abort
|
||||||
|
return '{…}' . codeium#GetStatusString()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! airline#extensions#codeium#init(ext) abort
|
||||||
|
call airline#parts#define_function('codeium', 'airline#extensions#codeium#status')
|
||||||
|
endfunction
|
|
@ -234,6 +234,7 @@ function! airline#init#bootstrap()
|
||||||
|
|
||||||
call airline#parts#define_text('bookmark', '')
|
call airline#parts#define_text('bookmark', '')
|
||||||
call airline#parts#define_text('capslock', '')
|
call airline#parts#define_text('capslock', '')
|
||||||
|
call airline#parts#define_text('codeium', '')
|
||||||
call airline#parts#define_text('gutentags', '')
|
call airline#parts#define_text('gutentags', '')
|
||||||
call airline#parts#define_text('gen_tags', '')
|
call airline#parts#define_text('gen_tags', '')
|
||||||
call airline#parts#define_text('grepper', '')
|
call airline#parts#define_text('grepper', '')
|
||||||
|
@ -267,7 +268,7 @@ function! airline#init#sections()
|
||||||
let g:airline_section_gutter = airline#section#create(['%='])
|
let g:airline_section_gutter = airline#section#create(['%='])
|
||||||
endif
|
endif
|
||||||
if !exists('g:airline_section_x')
|
if !exists('g:airline_section_x')
|
||||||
let g:airline_section_x = airline#section#create_right(['coc_current_function', 'bookmark', 'scrollbar', 'tagbar', 'taglist', 'vista', 'gutentags', 'gen_tags', 'omnisharp', 'grepper', 'filetype'])
|
let g:airline_section_x = airline#section#create_right(['coc_current_function', 'bookmark', 'scrollbar', 'tagbar', 'taglist', 'vista', 'gutentags', 'gen_tags', 'omnisharp', 'grepper', 'codeium', 'filetype'])
|
||||||
endif
|
endif
|
||||||
if !exists('g:airline_section_y')
|
if !exists('g:airline_section_y')
|
||||||
let g:airline_section_y = airline#section#create_right(['ffenc'])
|
let g:airline_section_y = airline#section#create_right(['ffenc'])
|
||||||
|
|
|
@ -657,6 +657,12 @@ coc <https://github.com/neoclide/coc.nvim>
|
||||||
* change the warning format (%C - error count, %L - line number): >
|
* change the warning format (%C - error count, %L - line number): >
|
||||||
let airline#extensions#coc#stl_format_warn = '%C(L%L)'
|
let airline#extensions#coc#stl_format_warn = '%C(L%L)'
|
||||||
<
|
<
|
||||||
|
------------------------------------- *airline-codeium*
|
||||||
|
vim-codeium <https://github.com/Exafunction/codeium.vim>
|
||||||
|
|
||||||
|
* enable/disable codeium.vim integration >
|
||||||
|
let g:airline#extensions#codeium#enabled = 1
|
||||||
|
|
||||||
------------------------------------- *airline-commandt*
|
------------------------------------- *airline-commandt*
|
||||||
command-t <https://github.com/wincent/command-t>
|
command-t <https://github.com/wincent/command-t>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user