Tries to improve firenvim support

This commit is contained in:
Bruno Carlin 2020-03-16 09:15:52 +01:00
parent b8ae2e0d3a
commit 4c698df9c1

View file

@ -14,5 +14,21 @@ let g:firenvim_config = {
\ 'localSettings': { } \ 'localSettings': { }
\ } \ }
function! s:IsFirenvimActive(event) abort
if !exists('*nvim_get_chan_info')
return 0
endif
let l:ui = nvim_get_chan_info(a:event.chan)
return has_key(l:ui, 'client') && has_key(l:ui.client, "name") &&
\ l:ui.client.name is# "Firenvim"
endfunction
function! OnUIEnter(event) abort
if s:IsFirenvimActive(a:event)
set laststatus=0
endif
endfunction
autocmd UIEnter * call OnUIEnter(deepcopy(v:event))
let fc = g:firenvim_config['localSettings'] let fc = g:firenvim_config['localSettings']
let fc['https://share\.waarp\.org/'] = { 'takeover': 'never', 'priority': 1 } let fc['https://share\.waarp\.org/'] = { 'takeover': 'never', 'priority': 1 }