Fork me on GitHub
#vim
<
2021-08-21
>
dharrigan17:08:32

So, if anyone is using coc and neovim, the most recent coc now supports callhierarchy, incoming and outgoing

emilaasa14:08:01

Thanks David you're my go-to vim resource now 😄

dharrigan17:08:37

It works quite well 😄

dharrigan17:08:46

Here is an example:

dharrigan17:08:34

The magic to put into your coc-settings.json is this:

dharrigan17:08:49

(to split it horziontally, 10 lines)

dharrigan17:08:54

"callHierarchy.splitCommand": "bel 10sp",

dharrigan18:08:03

Then, in your vimrc, something like this:

dharrigan18:08:23

nmap <silent> <Leader>ci :call CocAction('showIncomingCalls')<CR>

dharrigan18:08:32

nmap <silent> <Leader>co :call CocAction('showOutgoingCalls')<CR>

dharrigan18:08:39

There may be other ways that work, but that works for me 🙂

dharrigan18:08:26

You can also press <tab> in the bottom window, to swap between the both:

dharrigan18:08:55

There's other tree mappings that can be used:

NoahTheDuke18:08:01

That’s so dang cool. I’ll add the preferences to coc-clojure for autocomplete! Can’t wait to use this

dharrigan18:08:02

w00t! that would be super awesome!