{"owner":"zbirenbaum","repo":"copilot.lua","hasSkills":true,"totalSkillsCount":1,"totalTokensCount":798,"categories":["claude-rule"],"hasMcp":false,"mcpConfig":null,"found":["CLAUDE.md"],"skills":{"CLAUDE.md":"# CLAUDE.md\n\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\n\n## Project Overview\n\ncopilot.lua is a pure Lua Neovim plugin for GitHub Copilot integration, replacing github/copilot.vim. It communicates with the Copilot Language Server via Neovim's built-in LSP client to provide inline suggestions, a completion panel, and next-edit suggestions (NES).\n\n**Requirements**: Neovim 0.11+. The native binary server is the default; Node.js 22+ is required only for explicit `server = { type = \"nodejs\" }` mode.\n\n## Development Commands\n\n```bash\nmake deps                          # Clone mini.nvim and osv into deps/\nmake test                          # Run all tests (auto-fetches deps)\nmake test_file FILE=tests/test_client.lua  # Run a single test file\n```\n\n**Code quality** (checked in CI):\n- **Format**: Stylua (config in `.stylua.toml`)\n- **Lint**: Luacheck (config in `.luacheckrc`, vim globals allowed)\n- **Typecheck**: Lua type annotations\n\n## Architecture\n\n### Initialization Flow\n\n`plugin/copilot.lua` registers the `:Copilot` user command. When `require(\"copilot\").setup(opts)` is called:\n\n1. Validates Neovim version, sets up highlights, merges config\n2. On `:Copilot` or lazy trigger → `client.setup()` starts the LSP server\n3. `BufEnter` autocmd attaches buffers based on filetype rules and `should_attach`\n4. `suggestion.setup()` and `panel.setup()` wire up their keymaps and handlers\n\nThe LSP client is lazily initialized — it starts on first buffer attach or explicit command.\n\n### Key Modules (`lua/copilot/`)\n\n| Module | Role |\n|--------|------|\n| `client/` | LSP client lifecycle, buffer attach/detach, state tracking |\n| `api/` | Wraps all LSP requests/notifications (coroutine-based async) |\n| `lsp/` | Server startup — downloaded native binary by default or explicit `nodejs.lua` mode |\n| `config/` | Modular config with per-feature defaults, deep merge, validation |\n| `auth/` | Device code sign-in flow, token caching from `~/.config/github-copilot/` |\n| `suggestion/` | Inline virtual text completions with accept/dismiss/cycle |\n| `panel/` | Split window showing multiple completions with navigation |\n| `nes/` | Next Edit Suggestion (experimental, requires copilot-lsp plugin) |\n| `keymaps/` | Buffer-local keymap registration with passthrough support |\n| `model.lua` | Model listing, selection, get/set |\n| `logger/` | Dual file + console logging with configurable levels |\n| `status/` | LSP status notifications and callback system |\n\n### Design Patterns\n\n- **Coroutine-based async**: LSP requests are wrapped in coroutines via `api/init.lua`\n- **Passthrough keymaps**: Keymaps fall through to original bindings if the action returns `false`\n- **Buffer-local state**: Suggestion context and keymaps are per-buffer\n- **Config cascading**: User opts deep-merged over module defaults with type validation\n\n## Testing\n\nTests use **mini.test** (from mini.nvim). Test stubs in `tests/stubs/` mock the LSP server and Node.js to enable testing without a real Copilot server.\n\n- `tests/child_helper.lua` manages child Neovim processes for integration tests\n- `tests/scripts/minimal_init.lua` is the minimal Neovim config used by the test harness\n- CI runs tests on Ubuntu (ARM), macOS, and Windows against both stable and nightly Neovim\n"},"files":{"CLAUDE.md":"# CLAUDE.md\n\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\n\n## Project Overview\n\ncopilot.lua is a pure Lua Neovim plugin for GitHub Copilot integration, replacing github/copilot.vim. It communicates with the Copilot Language Server via Neovim's built-in LSP client to provide inline suggestions, a completion panel, and next-edit suggestions (NES).\n\n**Requirements**: Neovim 0.11+. The native binary server is the default; Node.js 22+ is required only for explicit `server = { type = \"nodejs\" }` mode.\n\n## Development Commands\n\n```bash\nmake deps                          # Clone mini.nvim and osv into deps/\nmake test                          # Run all tests (auto-fetches deps)\nmake test_file FILE=tests/test_client.lua  # Run a single test file\n```\n\n**Code quality** (checked in CI):\n- **Format**: Stylua (config in `.stylua.toml`)\n- **Lint**: Luacheck (config in `.luacheckrc`, vim globals allowed)\n- **Typecheck**: Lua type annotations\n\n## Architecture\n\n### Initialization Flow\n\n`plugin/copilot.lua` registers the `:Copilot` user command. When `require(\"copilot\").setup(opts)` is called:\n\n1. Validates Neovim version, sets up highlights, merges config\n2. On `:Copilot` or lazy trigger → `client.setup()` starts the LSP server\n3. `BufEnter` autocmd attaches buffers based on filetype rules and `should_attach`\n4. `suggestion.setup()` and `panel.setup()` wire up their keymaps and handlers\n\nThe LSP client is lazily initialized — it starts on first buffer attach or explicit command.\n\n### Key Modules (`lua/copilot/`)\n\n| Module | Role |\n|--------|------|\n| `client/` | LSP client lifecycle, buffer attach/detach, state tracking |\n| `api/` | Wraps all LSP requests/notifications (coroutine-based async) |\n| `lsp/` | Server startup — downloaded native binary by default or explicit `nodejs.lua` mode |\n| `config/` | Modular config with per-feature defaults, deep merge, validation |\n| `auth/` | Device code sign-in flow, token caching from `~/.config/github-copilot/` |\n| `suggestion/` | Inline virtual text completions with accept/dismiss/cycle |\n| `panel/` | Split window showing multiple completions with navigation |\n| `nes/` | Next Edit Suggestion (experimental, requires copilot-lsp plugin) |\n| `keymaps/` | Buffer-local keymap registration with passthrough support |\n| `model.lua` | Model listing, selection, get/set |\n| `logger/` | Dual file + console logging with configurable levels |\n| `status/` | LSP status notifications and callback system |\n\n### Design Patterns\n\n- **Coroutine-based async**: LSP requests are wrapped in coroutines via `api/init.lua`\n- **Passthrough keymaps**: Keymaps fall through to original bindings if the action returns `false`\n- **Buffer-local state**: Suggestion context and keymaps are per-buffer\n- **Config cascading**: User opts deep-merged over module defaults with type validation\n\n## Testing\n\nTests use **mini.test** (from mini.nvim). Test stubs in `tests/stubs/` mock the LSP server and Node.js to enable testing without a real Copilot server.\n\n- `tests/child_helper.lua` manages child Neovim processes for integration tests\n- `tests/scripts/minimal_init.lua` is the minimal Neovim config used by the test harness\n- CI runs tests on Ubuntu (ARM), macOS, and Windows against both stable and nightly Neovim\n"},"items":[{"name":"CLAUDE.md","path":"CLAUDE.md","rawUrl":"https://raw.githubusercontent.com/zbirenbaum/copilot.lua/HEAD/CLAUDE.md","title":"Claude Agent Guidelines & System Prompt","category":"claude-rule","format":"markdown","content":"# CLAUDE.md\n\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\n\n## Project Overview\n\ncopilot.lua is a pure Lua Neovim plugin for GitHub Copilot integration, replacing github/copilot.vim. It communicates with the Copilot Language Server via Neovim's built-in LSP client to provide inline suggestions, a completion panel, and next-edit suggestions (NES).\n\n**Requirements**: Neovim 0.11+. The native binary server is the default; Node.js 22+ is required only for explicit `server = { type = \"nodejs\" }` mode.\n\n## Development Commands\n\n```bash\nmake deps                          # Clone mini.nvim and osv into deps/\nmake test                          # Run all tests (auto-fetches deps)\nmake test_file FILE=tests/test_client.lua  # Run a single test file\n```\n\n**Code quality** (checked in CI):\n- **Format**: Stylua (config in `.stylua.toml`)\n- **Lint**: Luacheck (config in `.luacheckrc`, vim globals allowed)\n- **Typecheck**: Lua type annotations\n\n## Architecture\n\n### Initialization Flow\n\n`plugin/copilot.lua` registers the `:Copilot` user command. When `require(\"copilot\").setup(opts)` is called:\n\n1. Validates Neovim version, sets up highlights, merges config\n2. On `:Copilot` or lazy trigger → `client.setup()` starts the LSP server\n3. `BufEnter` autocmd attaches buffers based on filetype rules and `should_attach`\n4. `suggestion.setup()` and `panel.setup()` wire up their keymaps and handlers\n\nThe LSP client is lazily initialized — it starts on first buffer attach or explicit command.\n\n### Key Modules (`lua/copilot/`)\n\n| Module | Role |\n|--------|------|\n| `client/` | LSP client lifecycle, buffer attach/detach, state tracking |\n| `api/` | Wraps all LSP requests/notifications (coroutine-based async) |\n| `lsp/` | Server startup — downloaded native binary by default or explicit `nodejs.lua` mode |\n| `config/` | Modular config with per-feature defaults, deep merge, validation |\n| `auth/` | Device code sign-in flow, token caching from `~/.config/github-copilot/` |\n| `suggestion/` | Inline virtual text completions with accept/dismiss/cycle |\n| `panel/` | Split window showing multiple completions with navigation |\n| `nes/` | Next Edit Suggestion (experimental, requires copilot-lsp plugin) |\n| `keymaps/` | Buffer-local keymap registration with passthrough support |\n| `model.lua` | Model listing, selection, get/set |\n| `logger/` | Dual file + console logging with configurable levels |\n| `status/` | LSP status notifications and callback system |\n\n### Design Patterns\n\n- **Coroutine-based async**: LSP requests are wrapped in coroutines via `api/init.lua`\n- **Passthrough keymaps**: Keymaps fall through to original bindings if the action returns `false`\n- **Buffer-local state**: Suggestion context and keymaps are per-buffer\n- **Config cascading**: User opts deep-merged over module defaults with type validation\n\n## Testing\n\nTests use **mini.test** (from mini.nvim). Test stubs in `tests/stubs/` mock the LSP server and Node.js to enable testing without a real Copilot server.\n\n- `tests/child_helper.lua` manages child Neovim processes for integration tests\n- `tests/scripts/minimal_init.lua` is the minimal Neovim config used by the test harness\n- CI runs tests on Ubuntu (ARM), macOS, and Windows against both stable and nightly Neovim\n","isInternal":false,"tokens":798,"sizeBytes":3313}],"systemPromptSnippet":"<yakaai_skills repo=\"zbirenbaum/copilot.lua\">\n<!-- File: CLAUDE.md (Tokens: ~798 | Category: claude-rule) -->\n# CLAUDE.md\n\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\n\n## Project Overview\n\ncopilot.lua is a pure Lua Neovim plugin for GitHub Copilot integration, replacing github/copilot.vim. It communicates with the Copilot Language Server via Neovim's built-in LSP client to provide inline suggestions, a completion panel, and next-edit suggestions (NES).\n\n**Requirements**: Neovim 0.11+. The native binary server is the default; Node.js 22+ is required only for explicit `server = { type = \"nodejs\" }` mode.\n\n## Development Commands\n\n```bash\nmake deps                          # Clone mini.nvim and osv into deps/\nmake test                          # Run all tests (auto-fetches deps)\nmake test_file FILE=tests/test_client.lua  # Run a single test file\n```\n\n**Code quality** (checked in CI):\n- **Format**: Stylua (config in `.stylua.toml`)\n- **Lint**: Luacheck (config in `.luacheckrc`, vim globals allowed)\n- **Typecheck**: Lua type annotations\n\n## Architecture\n\n### Initialization Flow\n\n`plugin/copilot.lua` registers the `:Copilot` user command. When `require(\"copilot\").setup(opts)` is called:\n\n1. Validates Neovim version, sets up highlights, merges config\n2. On `:Copilot` or lazy trigger → `client.setup()` starts the LSP server\n3. `BufEnter` autocmd attaches buffers based on filetype rules and `should_attach`\n4. `suggestion.setup()` and `panel.setup()` wire up their keymaps and handlers\n\nThe LSP client is lazily initialized — it starts on first buffer attach or explicit command.\n\n### Key Modules (`lua/copilot/`)\n\n| Module | Role |\n|--------|------|\n| `client/` | LSP client lifecycle, buffer attach/detach, state tracking |\n| `api/` | Wraps all LSP requests/notifications (coroutine-based async) |\n| `lsp/` | Server startup — downloaded native binary by default or explicit `nodejs.lua` mode |\n| `config/` | Modular config with per-feature defaults, deep merge, validation |\n| `auth/` | Device code sign-in flow, token caching from `~/.config/github-copilot/` |\n| `suggestion/` | Inline virtual text completions with accept/dismiss/cycle |\n| `panel/` | Split window showing multiple completions with navigation |\n| `nes/` | Next Edit Suggestion (experimental, requires copilot-lsp plugin) |\n| `keymaps/` | Buffer-local keymap registration with passthrough support |\n| `model.lua` | Model listing, selection, get/set |\n| `logger/` | Dual file + console logging with configurable levels |\n| `status/` | LSP status notifications and callback system |\n\n### Design Patterns\n\n- **Coroutine-based async**: LSP requests are wrapped in coroutines via `api/init.lua`\n- **Passthrough keymaps**: Keymaps fall through to original bindings if the action returns `false`\n- **Buffer-local state**: Suggestion context and keymaps are per-buffer\n- **Config cascading**: User opts deep-merged over module defaults with type validation\n\n## Testing\n\nTests use **mini.test** (from mini.nvim). Test stubs in `tests/stubs/` mock the LSP server and Node.js to enable testing without a real Copilot server.\n\n- `tests/child_helper.lua` manages child Neovim processes for integration tests\n- `tests/scripts/minimal_init.lua` is the minimal Neovim config used by the test harness\n- CI runs tests on Ubuntu (ARM), macOS, and Windows against both stable and nightly Neovim\n</yakaai_skills>"}