1
0
mirror of https://github.com/amix/vimrc synced 2025-07-27 23:45:00 +08:00

Add support for Coc.nvim.

This commit is contained in:
Kurtis Moxley
2022-05-19 01:29:28 +08:00
parent 4ef73a3898
commit 9e29fd54b4
37 changed files with 16228 additions and 0 deletions

View File

@ -0,0 +1,32 @@
scriptencoding utf-8
function! coc#dict#equal(one, two) abort
for key in keys(a:one)
if a:one[key] != a:two[key]
return 0
endif
endfor
return 1
endfunction
" Return new dict with keys removed
function! coc#dict#omit(dict, keys) abort
let res = {}
for key in keys(a:dict)
if index(a:keys, key) == -1
let res[key] = a:dict[key]
endif
endfor
return res
endfunction
" Return new dict with keys only
function! coc#dict#pick(dict, keys) abort
let res = {}
for key in keys(a:dict)
if index(a:keys, key) != -1
let res[key] = a:dict[key]
endif
endfor
return res
endfunction