Skip to content

Lua plugin to turn github copilot into a cmp source

Notifications You must be signed in to change notification settings

Ganitzsh/copilot-cmp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

copilot-cmp

This repository transforms https://github.com/zbirenbaum/copilot.lua into a cmp source.

Copilot suggestions will automatically be loaded into your cmp menu as snippets and display their full contents when a copilot suggestion is hovered.

copilot-cmp

Setup

If you already have copilot.lua installed, you can install this plugin with packer as you would any other with the following code:

Install

use {
    "zbirenbaum/copilot-cmp",
    after = { "copilot.lua", "nvim-cmp" },
}

If you do not have copilot.lua installed, go to https://github.com/zbirenbaum/copilot.lua and follow the instructions there before installing this one

Configuration

To link cmp with this source, simply go into your cmp configuration file and include { name = "copilot" } under your sources

Here is an example of what it should look like:

cmp.setup {
  ...
  sources = {
    { name = "copilot", group_index = 2 },
    { name = "nvim_lsp", group_index = 2 },
    { name = "path", group_index = 2 },
    { name = "luasnip", group_index = 2 },
  },
  ...
}

About

Lua plugin to turn github copilot into a cmp source

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 100.0%