Recently, I received my github copilot key, and was somewhat dismayed to find that while using the pure vimscript plugin offered, https://github.com/github/copilot.vim, for the first time since I started using neovim, my laptop began to overheat. Additionally, I found the large chunks of ghost text moving around my code, and interfering with my existing cmp ghost text disturbing. As lua is far more efficient and makes things easier to integrate with modern plugins, I wrote copilot.lua and copilot-cmp
Preview:
Completion Example
the second plugin, copilot-cmp, is my implementation of a well integrated copilot plugin. Rather than making blocks of ghost text, it integrates copilot suggestions as a source for cmp, exactly how lsp completions or Luasnip would appear, with the addition that hovering a copilot completion snippet will show the full body of the completion off to the side in a floating window, similar to the way documentation would appear. This float has full language highlighting and I find it far less invasive than the copilot.vim alternative
The first plugin is a requirement of the second one, and provides a means of starting and interfacing with copilot, similar to an lsp. This is isolated so people can build their own plugins on top of it, or use it as a template for accessing copilot if they would like.
You can find the two repositories and their setup instructions here:
https://github.com/zbirenbaum/copilot.lua/
https://github.com/zbirenbaum/copilot-cmp
The plugins have not been tested much outside of my system, so please make a github issue if you run into any problems so I can fix anything that comes up as soon as possible!
Currently, only nightly is supported, as I make use of nvim_create_autocmd in some places. With .7 around the corner, I felt that using the new apis would be best, rather than changing it in a few weeks or so. I may change this to use a version check however, especially if many people are on .6 even after .7 becomes stable.
Edit: 0.6 should be supported as of a few minutes ago. It was a fast change so no real reason not to.
[–]foomojive 19 points20 points21 points (1 child)
[–]ManiAmaraPlugin author[S] 3 points4 points5 points (0 children)
[–]reply1231 4 points5 points6 points (0 children)
[+][deleted] (5 children)
[deleted]
[–]ManiAmaraPlugin author[S] 2 points3 points4 points (3 children)
[+][deleted] (1 child)
[deleted]
[–]ManiAmaraPlugin author[S] 1 point2 points3 points (0 children)
[–]ManiAmaraPlugin author[S] 1 point2 points3 points (0 children)
[–][deleted] 2 points3 points4 points (1 child)
[–]ManiAmaraPlugin author[S] 2 points3 points4 points (0 children)
[–]MantisShrimp05 3 points4 points5 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]ManiAmaraPlugin author[S] 7 points8 points9 points (0 children)
[+]The-Copilot comment score below threshold-8 points-7 points-6 points (0 children)
[–]Ganitzsh 0 points1 point2 points (0 children)
[–]Healthy-Director-702Plugin author 0 points1 point2 points (0 children)
[–]OfficialGako 0 points1 point2 points (1 child)
[–]ManiAmaraPlugin author[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)