WIP: update nvim

This commit is contained in:
Shockwave 2024-01-07 09:56:50 +08:00
parent 753aabb198
commit c3400b3438
1 changed files with 14 additions and 12 deletions

View File

@ -108,16 +108,18 @@ vim.cmd([[
endfunc endfunc
command! -nargs=* -complete=file TrimAll :silent! call s:TrimAll() command! -nargs=* -complete=file TrimAll :silent! call s:TrimAll()
func! provider#clipboard#Executable() abort
if exists('g:clipboard')
if type({}) isnot# type(g:clipboard)
\ || type({}) isnot# type(get(g:clipboard, 'copy', v:null))
\ || type({}) isnot# type(get(g:clipboard, 'paste', v:null))
let s:err = 'clipboard: invalid g:clipboard'
return ''
endif
let s:copy = get(g:clipboard, 'copy', { '+': v:null, '*': v:null })
let s:paste = get(g:clipboard, 'paste', { '+': v:null, '*': v:null })
let s:cache_enabled = get(g:clipboard, 'cache_enabled', 0)
return get(g:clipboard, 'name', 'g:clipboard')
]]) ]])
-- func! provider#clipboard#Executable() abort
-- if exists('g:clipboard')
-- if type({}) isnot# type(g:clipboard)
-- \ || type({}) isnot# type(get(g:clipboard, 'copy', v:null))
-- \ || type({}) isnot# type(get(g:clipboard, 'paste', v:null))
-- let s:err = 'clipboard: invalid g:clipboard'
-- return ''
-- endif
-- let s:copy = get(g:clipboard, 'copy', { '+': v:null, '*': v:null })
-- let s:paste = get(g:clipboard, 'paste', { '+': v:null, '*': v:null })
-- let s:cache_enabled = get(g:clipboard, 'cache_enabled', 0)
-- return get(g:clipboard, 'name', 'g:clipboard')
-- endfunc