Skip to main content
Back to Extensions Directory
coc.nvim fallback icon

@statiolake/coc-github-copilot

statiolake

GitHub Copilot extension for coc.nvim with inline completion support

Installation CommandVim prompt
:CocInstall @statiolake/coc-github-copilot
GitHub owner
statiolake
Version
v2.3.0
Requirements
coc ^0.0.82
License
MIT
Repository
GitHub
npm latest published 2025-07-29Registry checked 2026-08-23Registry summary

Published Package Summary

@statiolake/coc-github-copilot

GitHub Copilot integration for coc.nvim with inline completions and Language Model API support.

Features

  • 🤖 GitHub Copilot Integration: Official GitHub Copilot Language Server integration
  • 🔐 Device Authentication: Secure GitHub device authentication flow
  • Inline Completions: Automatic code suggestions via Language Server
  • 🗨️ Language Model API: Provides chat models for other extensions
  • 📊 Status Monitoring: Real-time authentication and service status
  • 🛠️ Simple Configuration: Works out of the box with minimal setup

Installation

Prerequisites

Install via coc.nvim

:CocInstall @statiolake/coc-lm-api @statiolake/coc-github-copilot

Install via npm

npm install -g @statiolake/coc-lm-api @statiolake/coc-github-copilot

Setup

  1. Install both required extensions
  2. Run :CocCommand copilot.signIn to authenticate with GitHub
  3. Follow the device authentication flow in your browser
  4. Start coding with Copilot suggestions!

Status Bar

The extension displays the current Copilot status in the coc.nvim status bar:

  • Copilot: N/A - Not authenticated or service unavailable
  • Copilot: Ready (username) - Authenticated and ready

Language Model API Integration

This extension automatically registers GitHub Copilot chat models with the LM API, making them available to other extensions like @statiolake/coc-lm-chat.

Available Models

The extension provides access to GitHub Copilot's chat models:

  • gpt-4.1 - Latest GPT-4 variant
  • o1-preview - Reasoning model preview
  • o1-mini - Lightweight reasoning model

Usage

Inline Completions

Once authenticated, Copilot will automatically provide suggestions in the coc.nvim completion popup as you type.

Language Model Access

Other extensions can access Copilot models through the LM API:

import type { LmApi } from '@statiolake/coc-lm-api';

const lmApi: LmApi = extensions.getExtensionById('@statiolake/coc-lm-api').exports;
const models = lmApi.selectChatModels({ vendor: 'GitHub' });

Troubleshooting

Authentication Issues

  1. Make sure you have a valid GitHub Copilot subscription
  2. Try signing out and signing in again: :CocCommand copilot.signOut then :CocCommand copilot.signIn
  3. Check the status: :CocCommand copilot.status

No Completions

  1. Verify Copilot is enabled: :CocCommand copilot.enable
  2. Check your internet connection
  3. Ensure the file type is supported by Copilot

Extension Dependencies

If you see errors about missing LM API:

  1. Install the required dependency: :CocInstall @statiolake/coc-lm-api
  2. Restart coc.nvim: :CocRestart

Development

# Clone the repository
git clone https://github.com/statiolake/coc-github-copilot.git
cd coc-github-copilot

# Install dependencies
npm install

# Build
npm run build

# Watch mode for development
npm run watch

# Run linting
npm run lint

Related Extensions

License

MIT

Repository

GitHub

Acknowledgments

Read the complete README
  • GitHub Copilot extension for coc.nvim with inline completion support
Activation Events
  • *
Developer Resources

Want to build, test, or contribute to coc.nvim extensions? Explore our official SDK and testing toolkits.

Open Developer Guide

Version History

This published npm package does not include a history.md or changelog.md file. Browse its npm versions or repository releases for available release information.