2

I'm not finding much out there in terms of docs about using copilot with regular vim (everything I've come across is about using it with nvim / neovim)

The copilot.vim docs mention it should support newer versions of vim "9.0.0162 or newer", so I've built vim from source and installed it, ran :Copilot setup successfully, and it seems to be partially working. However it doesn't provide any suggestions inline while typing.

:Copilot status reports: "Copilot: Neovim 0.6 required to support ghost text" so I'm guessing there is a problem with the parts that show the inline preview.

If I open the :Copilot panel I can see it's suggestions and accept them with the enter button, but it's unwieldy to use via the separate panel.

So are there any guides or anwers about how to get this working better in regular vim? Thank you

kjones
  • 153
  • 7
  • 2
    You might be able to make it work with some relatively new (experimental?) features of Vim's text properties that are similar to "ghost text" (i.e., virtual text) – D. Ben Knoble Sep 08 '22 at 23:57
  • Thank you for the tip; it led me to https://github.com/vim/vim/issues/7553 and to double check that I had the required patch 162 which apparently I did not, and the inline virtual text is now working – kjones Sep 09 '22 at 05:14
  • 1
    Moreover, Copilot is a paid service (if not right now, it's gonna be). Why not get your money's worth and ask their help desk? – 3N4N Sep 20 '22 at 08:58
  • I preferred to ask on here, thank you – kjones Sep 21 '22 at 16:10

1 Answers1

3

Inline suggestions (AKA "virtual text" or "ghost text") require vim version 9.0.0162 (patch 162); use vim --version to see vim's version and installed patches, ex.:

VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Sep  8 2022 22:06:47)
Included patches: 1-420

and also require vim to be compiled with the textprop feature

kjones
  • 153
  • 7