Skip to main content
13 events
when toggle format what by license comment
S Aug 28, 2020 at 15:29 history edited Luc Hermitte CC BY-SA 4.0
Improved formatting
S Aug 28, 2020 at 15:29 history suggested mmoya CC BY-SA 4.0
Improved formatting
Aug 28, 2020 at 12:58 review Suggested edits
S Aug 28, 2020 at 15:29
Nov 24, 2019 at 19:58 comment added Steven Lu @LucHermitte I resolved this issue quite satisfactorily based on what I gleaned from github.com/neoclide/coc.nvim/issues/1249, I have 4 different vim maps which implement the 4 ways to open definition: regular (in present window), in split, in vsplit, in new tab. The main thing was that the coc instructions/doc never mentioned these alternate ways of going to definition. As for going to references or implementation I use them less and also the cocList comes with binds for these different opening modalities.
Nov 24, 2019 at 15:26 history edited Luc Hermitte CC BY-SA 4.0
edited body
Nov 24, 2019 at 15:24 comment added Luc Hermitte @StevenLu. Could you be more specific about what you have already done? And how you've configured coc? First do you have a command that does the job by itself? Then, are you able to replace, first, the default opening policy with :sp fr instance? Eventually if both previous steps are working correctly, you could be able to have it working by using the custom command instead of :sp. Just be aware that COC injects a position prefix, hence my function.
Nov 22, 2019 at 20:07 comment added Steven Lu This simply does not work for me.
Nov 5, 2019 at 15:19 comment added Luc Hermitte It's COC doing. It encodes a few things in the filenames in order to specify the position the cursor shall jump to. NB: my function will return a negative number only if it cannot jump into a window (new or not) containing the requested file.
Nov 5, 2019 at 6:48 comment added Joyce Babu After reading a few tutorials, I could understand parts of your function code. The first argument, if prefixed with +, is stored in where variable and is executed as an ex command when the file is not open in any existing window. But what is the content of the where variable? Is it set by coc, or do you use pass it when manually invoking SplitIfNotOpen4C0C?
Nov 4, 2019 at 23:52 comment added Luc Hermitte lh#coc#_split_open() is a COC specific wrapper around another function of mine: the one that is a kind of :sb_or_sp (if it were to exist).
Nov 4, 2019 at 20:23 comment added Joyce Babu Thank you. Setting coc.preferences.jumpCommand to vsp worked. I have just started learning vim, so I couldn't fully understand lh#coc#_split_open. I don't want to copy paste blindly, and will give it a second look after learning vimscript.
Nov 4, 2019 at 20:20 vote accept Joyce Babu
Nov 4, 2019 at 18:40 history answered Luc Hermitte CC BY-SA 4.0