ui-ux-pro-max-skill
An AI skill that provides design intelligence for building professional UI/UX across multiple platforms.
- 153k
- Python
- MIT
- 9 h ago
Chat with GitHub Copilot in Neovim
Repo CopilotC-Nvim/CopilotChat.nvim, read from GitHub 11 h ago. CopilotC-Nvim has not joined Take My Repo.
CopilotC-Nvim/CopilotChat.nvim is a public repo on GitHub by CopilotC-Nvim. Chat with GitHub Copilot in Neovim. It declares the GPL-3.0 license on GitHub. It is written mainly in Lua, has 3,645 stars and last changed on 2026-10-23. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-23.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.
CopilotChat.nvim brings GitHub Copilot Chat capabilities directly into Neovim with a focus on transparency and user control.
Warning
For Neovim < 0.11.0, add noinsert or noselect to your completeopt otherwise chat autocompletion will not work.
For best autocompletion experience, also add popup to your completeopt (even on Neovim 0.11.0+).
luajit-tiktoken-bin or lua51-tiktoken-bin from AURsudo luarocks install --lua-version 5.1 tiktoken_coretiktoken_core.so in your Lua pathFor various plugin pickers to work correctly, you need to replace vim.ui.select with your desired picker (as the default vim.ui.select is very basic). Here are some examples:
require('fzf-lua').register_ui_select()telescope-ui-select.nvim pluginui_select configvim.ui.select = require('mini.pick').ui_selectreturn { { "CopilotC-Nvim/CopilotChat.nvim", dependencies = { { "nvim-lua/plenary.nvim", branch = "master" }, }, build = "make tiktoken", opts = { -- See Configuration section for options }, }, }
call plug#begin() Plug 'nvim-lua/plenary.nvim' Plug 'CopilotC-Nvim/CopilotChat.nvim' call plug#end() lua << EOF require("CopilotChat").setup() EOF
#<name>) - Add specific content (files, git diffs, URLs) to your prompt@<name>) - Give LLM access to functions it can call during the chat, with manual approval by default> <text>) - Persist context across single chat session$<model>) - Specify which AI model to use for the chat/PromptName) - Use predefined prompt templates for common tasksTip
Press <Tab> after typing # or @ to see available options and auto-complete. This is the easiest way to discover what's available!
| Command | Description |
|---|---|
:CopilotChat <input>? |
Open chat with optional input |
:CopilotChatOpen |
Open chat window |
:CopilotChatClose |
Close chat window |
:CopilotChatToggle |
Toggle chat window |
:CopilotChatStop |
Stop current output |
:CopilotChatReset |
Reset chat window |
:CopilotChatSave <name>? |
Save chat history |
:CopilotChatLoad <name>? |
Load chat history |
:CopilotChatPrompts |
View/select prompt templates |
:CopilotChatModels |
View/select available models |
:CopilotChat<PromptName> |
Use specific prompt template |
| Insert | Normal | Action |
|---|---|---|
<Tab> |
- | Autocomplete resources/files/options (use this!) |
<C-c> |
q |
Close the chat window |
<C-l> |
<C-l> |
Reset and clear the chat window |
<C-s> |
<CR> |
Submit the current prompt |
<C-y> |
<C-y> |
Accept nearest diff |
| - | gj |
Jump to section of nearest diff |
| - | gqa |
Add all answers from chat to quickfix |
| - | gqd |
Add all diffs from chat to quickfix |
| - | gy |
Yank nearest diff to register |
| - | gd |
Show diff between source and nearest diff |
| - | gc |
Show info about current chat |
| - | gh |
Show help message |
💡 Pro tip: After typing #, @, #buffer:, or #file:, press <Tab> to see available options. This is the fastest way to work!
Note
Tab key not working? Some plugins (e.g. copilot.vim) also map <Tab> in insert mode.
To fix conflicts, disable the other plugin's <Tab> mapping:
-- For copilot.vim vim.g.copilot_no_tab_map = true vim.keymap.set('i', '<S-Tab>', 'copilot#Accept("\\<S-Tab>")', { expr = true, replace_keycodes = false })
Or customize CopilotChat keymaps in your config.
All predefined functions belong to the copilot group.
| Function | Manual #... |
Description | Available Options |
|---|---|---|---|
bash |
No | Executes a bash command and returns output | Tool-only (use @copilot) |
buffer |
Yes | Retrieves content from buffer(s) with diagnostics | active, visible, listed, quickfix, buffer number, or filename |
clipboard |
Yes | Provides access to system clipboard content | No options |
edit |
No | Applies a unified diff to a file | Tool-only (use @copilot) |
file |
Yes | Reads content from a specified file path | Any file path (use <Tab> for completion) |
gitdiff |
Yes | Retrieves git diff information | unstaged (default), staged, or commit SHA |
glob |
Yes | Lists filenames matching a pattern in workspace | Any glob pattern (default: **/*) |
grep |
Yes | Searches for a pattern across files in workspace | Any search pattern |
selection |
Yes | Includes the current visual selection with diagnostics | No options |
url |
Yes | Fetches content from a specified URL | Any HTTPS URL |
#<function> - Embeds output directly in your message (e.g., #buffer:listed, #file:src/main.lua)@<function/group> - Makes function(s) available for LLM to call when needed (e.g., @copilot, @file)| Prompt | Description |
|---|---|
Explain |
Write detailed explanation of selected code as paragraphs |
Review |
Comprehensive code review with line-specific issue reporting |
Fix |
Identify problems and rewrite code with fixes and explanation |
Optimize |
Improve performance and readability with optimization strategy |
Docs |
Add documentation comments to selected code |
Tests |
Generate tests for selected code |
Commit |
Generate commit message with commitizen convention from staged changes |
# Current buffer #buffer:active # All open buffers (replaces old #buffers) #buffer:listed # All visible buffers #buffer:visible # Specific file #file:src/main.lua # Git changes #gitdiff:staged # URL content #url:https://example.com/docs
When you use @copilot, the LLM can call functions from the copilot group such as bash, edit, file, glob, grep, and gitdiff.
# Give LLM access to workspace tools @copilot What files are in this project? # Sticky context with tools > #buffer:listed > @copilot > Refactor the authentication code
By default, tool calls require manual approval. Configure trusted_tools to automatically run specific tools (see Functions).
Warning
trusted_tools = true allows the model to run every enabled tool without asking. Only use it if you fully trust the tool set and workspace.
For all available configuration options, see lua/CopilotChat/config.lua.
Most users only need to configure a few options:
{
model = 'gpt-5-mini', -- AI model to use
temperature = 0.1, -- Lower = focused, higher = creative
trusted_tools = nil, -- Require approval for all tool calls
window = {
layout = 'vertical', -- 'vertical', 'horizontal', 'float'
width = 0.5, -- 50% of screen width
},
auto_insert_mode = true, -- Enter insert mode when opening
}{
window = {
layout = 'float',
width = 80, -- Fixed width in columns
height = 20, -- Fixed height in rows
border = 'rounded', -- 'single', 'double', 'rounded', 'solid'
title = '🤖 AI Assistant',
zindex = 100, -- Ensure window stays on top
},
headers = {
user = '👤 You',
assistant = '🤖 Copilot',
tool = '🔧 Tool',
},
separator = '━━',
auto_fold = true, -- Automatically folds non-assistant messages
}window.layout also supports 'replace' to reuse the current window.
-- Auto-command to customize chat buffer behavior vim.api.nvim_create_autocmd('BufEnter', { pattern = 'copilot-chat', callback = function() vim.opt_local.relativenumber = false vim.opt_local.number = false vim.opt_local.conceallevel = 0 end, })
You can customize colors by setting highlight groups in your config:
-- In your colorscheme or init.lua vim.api.nvim_set_hl(0, 'CopilotChatHeader', { fg = '#7C3AED', bold = true }) vim.api.nvim_set_hl(0, 'CopilotChatSeparator', { fg = '#374151' })
Types of copilot highlights:
CopilotChatHeader - Header highlight in chat bufferCopilotChatSeparator - Separator highlight in chat bufferCopilotChatSelection - Selection highlight in source bufferCopilotChatStatus - Status and spinner in chat bufferCopilotChatHelp - Help text in chat bufferCopilotChatResource - Resource highlight in chat buffer (e.g. #file, #gitdiff)CopilotChatTool - Tool call highlight in chat buffer (e.g. @copilot)CopilotChatPrompt - Prompt highlight in chat buffer (e.g. /Explain, /Review)CopilotChatModel - Model highlight in chat buffer (e.g. $gpt-5-mini)CopilotChatUri - URI highlight in chat buffer (e.g. ##https://...)CopilotChatAnnotation - Annotation highlight in chat buffer (file headers, tool call headers, tool call body)CopilotChatAnnotationHeader - Annotation header highlight in chat bufferDefine your own prompts in the configuration:
{
prompts = {
MyCustomPrompt = {
prompt = 'Explain how it works.',
system_prompt = 'You are very good at explaining stuff',
mapping = '<leader>ccmc',
description = 'My custom prompt description',
},
Yarrr = {
system_prompt = 'You are fascinated by pirates, so please respond in pirate speak.',
},
NiceInstructions = {
system_prompt = 'You are a nice coding tutor, so please respond in a friendly and helpful manner.',
}
}
}Use trusted_tools to control which tool calls are executed automatically:
{
trusted_tools = nil, -- default: require approval for all tool calls
-- trust all functions in a group
-- trusted_tools = 'copilot',
-- trust specific functions by name or groups by name
-- trusted_tools = { 'file', 'glob', 'grep' },
-- trust every enabled tool call
-- trusted_tools = true,
}How tool trust works:
A tool is trusted when any of these match:
trusted = truetrusted_toolstrusted_toolstrusted_tools = trueRecommended setup: Trust read-only functions like file, glob, or grep for a smoother workflow without compromising safety.
Warning
Trusted tools run without asking for confirmation. Be especially careful with tools like bash and edit, which can change your workspace.
Define your own functions in the configuration with input handling and schema:
{
functions = {
birthday = {
description = 'Retrieves birthday information for a person',
uri = 'birthday://{name}',
trusted = false,
schema = {
type = 'object',
required = { 'name' },
properties = {
name = {
type = 'string',
enum = { 'Alice', 'Bob', 'Charlie' },
description = "Person's name",
},
},
},
resolve = function(input)
return {
{
uri = 'birthday://' .. input.name,
mimetype = 'text/plain',
data = input.name .. ' birthday info',
},
}
end,
},
}
}If a function has a uri, it can be used manually with #birthday:Alice. Functions without a uri are tool-only and can only be called by the model.
Add custom AI providers:
{
providers = {
my_provider = {
get_url = function(opts) return 'https://api.example.com/chat' end,
get_headers = function() return { ['Authorization'] = 'Bearer ' .. api_key } end,
get_models = function() return { { id = 'gpt-5-mini', name = 'GPT-5 mini model' } } end,
prepare_input = require('CopilotChat.config.providers').copilot.prepare_input,
prepare_output = require('CopilotChat.config.providers').copilot.prepare_output,
}
}
}Provider Interface:
{
-- Optional: Disable provider
disabled?: boolean,
-- Optional: Extra info about the provider displayed in info panel
get_info?(headers: table): string[]
-- Optional: Get extra request headers with optional expiration time
get_headers?(): table<string,string>, number?,
-- Optional: Get API endpoint URL
get_url?(opts: CopilotChat.Provider.options): string,
-- Optional: Prepare request input
prepare_input?(inputs: table<CopilotChat.Provider.input>, opts: CopilotChat.Provider.options): table,
-- Optional: Prepare response output
prepare_output?(output: table, opts: CopilotChat.Provider.options): CopilotChat.Provider.output,
-- Optional: Get available models
get_models?(headers: table): table<CopilotChat.Provider.model>,
-- Optional: Resolve a user-facing model id to a provider model id.
-- Second return value is optional extra request headers (e.g. Copilot-Session-Token).
resolve_model?(headers: table, model: string): string, table?,
}Built-in providers:
copilot - GitHub Copilot (default)github_models - GitHub Models (disabled by default)local chat = require('CopilotChat') -- Basic Chat Functions chat.ask(prompt, config) -- Ask a question with optional config -- Window Management chat.open(config) -- Open chat window with optional config chat.close() -- Close chat window chat.toggle(config) -- Toggle chat window visibility with optional config chat.reset() -- Reset the chat chat.stop() -- Stop current output -- Prompt & Model Management chat.select_prompt(config) -- Open prompt selector with optional config chat.select_model() -- Open model selector -- History Management chat.load(name, history_path) -- Load chat history chat.save(name, history_path) -- Save chat history -- Configuration chat.setup(config) -- Update configuration chat.log_level(level) -- Set log level (debug, info, etc.)
You can also access the chat window UI methods through the chat.chat object:
local window = require('CopilotChat').chat -- Chat UI State window:visible() -- Check if chat window is visible window:focused() -- Check if chat window is focused -- Message Management window:get_message(role, cursor) -- Get chat message by role, either last or closest to cursor window:add_message({ role, content }, replace) -- Add or replace a message in chat window:remove_message(role, cursor) -- Remove chat message by role, either last or closest to cursor window:get_block(role, cursor) -- Get code block by role, either last or closest to cursor -- Content Management window:append(text) -- Append text to chat window window:clear() -- Clear chat window content window:start() -- Start writing to chat window window:finish() -- Finish writing to chat window -- Source Management window:get_source() -- Get the current source buffer and window window:set_source(winnr) -- Set the source window -- Navigation window:follow() -- Move cursor to end of chat content window:focus() -- Focus the chat window -- Advanced Features window:overlay(opts) -- Show overlay with specified options
local parser = require('CopilotChat.prompts') parser.resolve_prompt() -- Resolve prompt references parser.resolve_tools() -- Resolve tools shared with the model via @... parser.resolve_functions() -- Resolve manual function/resource references via #... parser.resolve_model() -- Resolve model from prompt (WARN: async, requires plenary.async.run)
-- Open chat, ask a question and handle response require('CopilotChat').open() require('CopilotChat').ask('#buffer Explain this code', { callback = function(response) vim.notify('Got response: ' .. vim.trim(response.content):sub(1, 50) .. '...') end, }) -- Save and load chat history require('CopilotChat').save('my_debugging_session') require('CopilotChat').load('my_debugging_session') -- Use custom sticky and model require('CopilotChat').ask('How can I optimize this?', { model = 'gpt-5-mini', sticky = { '#buffer', '#gitdiff:staged' }, }) -- Automatically trust a small read-only tool set require('CopilotChat').setup({ trusted_tools = { 'file', 'glob', 'grep' }, })
For more examples, see the examples wiki page.
To set up the environment:
git clone https://github.com/CopilotC-Nvim/CopilotChat.nvim
cd CopilotChat.nvimmake install-pre-commit
To run tests:
make testTo run the same formatting check as CI:
stylua --check .See CONTRIBUTING.md for detailed guidelines.
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind are welcome!
CopilotC-Nvim/CopilotChat.nvim is a public repo on GitHub by CopilotC-Nvim. Chat with GitHub Copilot in Neovim.
It declares the GPL-3.0 license on GitHub.
Its maker tagged it for Linux. That is declared by the maker; Take My Repo has not tested it.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
Its last change on GitHub was on 2026-10-23. GitHub counts 26 open issues and pull requests. Take My Repo does not judge from that whether it is maintained.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.
An AI skill that provides design intelligence for building professional UI/UX across multiple platforms.
The Frontend Stack for Agents & Generative UI. React, Angular, Mobile, Slack, and more. Makers of the AG-UI Protocol
:octocat: 分享 GitHub 上有趣、入门级的开源项目。Share interesting, entry-level open source projects on GitHub.
FULL Augment Code, Claude Code, Cluely, CodeBuddy, Comet, Cursor, Devin AI, Junie, Kiro, Leap.new, Lovable, Manus, NotionAI, Orchids.app, Perplexity, Poke, Qoder, Replit, Same.dev, Trae, Traycer AI, VSCode Agent, Warp.dev, Windsurf, Xcode, Z.ai Code, Dia & v0. (And other Open Sourced) System Prompts, Internal Tools & AI Models
💫 Toolkit to help you get started with SDD or any other process!

The 30 Days of Python programming challenge is a step-by-step guide to learn the Python programming language in 30 days. This challenge may take more than 100 days. Follow your own pace. These videos may help too: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw
This page is also available as structured data, with the same sources and dates.
/api/v1/resources/gh/CopilotC-Nvim/CopilotChat.nvimTake My Repo has not tested this on your machine. Requirements come from the project's own documentation.