mirror of
https://github.com/raimon49/requirements.txt.vim.git
synced 2026-01-10 18:02:21 +08:00
21 lines
657 B
VimL
21 lines
657 B
VimL
""
|
|
" https://github.com/neoclide/coc.nvim/wiki/Create-custom-source
|
|
function! coc#source#requirements#init() abort
|
|
return {
|
|
\ 'shortcut': 'pip',
|
|
\ 'priority': 9,
|
|
\ 'filetypes': ['requirements'],
|
|
\ }
|
|
endfunction
|
|
|
|
""
|
|
" https://github.com/neoclide/coc.nvim/wiki/Create-custom-source
|
|
"
|
|
" Completion pip option and PYPI package names.
|
|
" Note: completion PYPI package names need install pip-cache from PYPI,
|
|
" and run `pip-cache update` first to generate cache.
|
|
function! coc#source#requirements#complete(opt, cb) abort
|
|
call a:cb(g:requirements#items)
|
|
endfunction
|
|
" vim: et sw=4 ts=4 sts=4:
|