sourcery-ai / sourcery

Instant AI code reviews
https://sourcery.ai
MIT License
1.53k stars 66 forks source link

[vim] Coc.nvim removed the CocAction and CocFix commands #247

Closed yelinaung closed 2 years ago

yelinaung commented 2 years ago

Issue description or question

After updating the Coc.nvim version, the Sourcery vim plugin no longer works due to Coc.nvim removal of CocAction and CoCFix commands. Reference: https://github.com/neoclide/coc.nvim/blob/72095ac4b96f4bef3809cafcaeddcaad074f7bcf/history.md#2022-05-24

Sourcery Version

$ sourcery --version
sourcery, version 0.12.0

Code editor or IDE name and version

Neovim

$ nvim --version    
NVIM v0.8.0-dev

OS name and version

Ubuntu Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 21.10
Release:        21.10
Codename:       impish

Suggestion

To replace the removed commands with the new commands

nnoremap <leader>cf :CocFix<cr> to nnoremap <leader>cf <Plug>(coc-fix-current) nnoremap <leader>ch :call CocAction('doHover')<cr> to nnoremap <leader>ch :call CocActionAsync('doHover') <cr>

based on https://github.com/neoclide/coc.nvim/discussions/3530

brendanator commented 2 years ago

Thanks for spotting this - this will be fixed soon

Hellebore commented 2 years ago

Resolved with release of 0.12.1