neoclide / coc.nvim

Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Other
24.51k stars 959 forks source link

coc-float-hide does not play nicely with actions #2133

Closed dlants closed 4 years ago

dlants commented 4 years ago

I use coc alongside https://github.com/easymotion/vim-easymotion

Easymotion (along with other similar plugins) sometimes rely on replacing some characters in the buffer with movement targets. This doesn't play well with floating windows since they cover up the text of the buffer. For example, in the screenshot below, the targets on lines 84 and 85 are covered up.

Screen Shot 2020-07-01 at 11 19 25 AM

I attempted to fix this issue by amending my bindings for "jumping around" to call coc-float-hide before invoking the easymotion action.

map <Leader>j <Plug>(coc-float-hide)<Plug>(easymotion-j)
map <Leader>k <Plug>(coc-float-hide)<Plug>(easymotion-k)

For moving around the buffer normally, this works. But for using motions in combinations with actions, it no longer works.

For example, to delete a range of lines in the document, I am able to do d <Leader> j, then choose a movement target. But with coc-float-hide, nothing happens.

Describe the solution you'd like coc-float-hide hides the floating windows without interfering with the action.

Describe alternatives you've considered My current workaround is to bind coc-float-hide to a different key combination. I can then manually hide the float windows before initiating the movement/action.

Additional context Add any other context or screenshots about the feature request here.

chemzqm commented 4 years ago

I think easy motion should provide the hook for user to hide all floats, or hide all floats for user. I don't want to detect for easy motion since that would be easily broken.