If you've noticed a bug or have a feature request, make sure to check our Issues page to see if someone else in the community has already created a ticket. If not, go ahead and make one!
If this is something you think you can fix, then fork CopilotChat.nvim and create a branch with a descriptive name.
A good branch name would be (where issue #325 is the ticket you're working on):
git checkout -b 325-add-japanese-localizationMake sure to check Structure first to understand the project structure.
At this point, you're ready to make your changes! Feel free to ask for help; everyone is a beginner at first. You can also ask in our Discord server, see README.
At this point, you should switch back to your main branch and make sure it's up to date with CopilotChat.nvim's main branch:
git remote add upstream git@github.com:CopilotC-Nvim/CopilotChat.nvim.git
git checkout main
git pull upstream mainThen update your feature branch from your local copy of master and push your branch to your GitHub account:
git checkout 325-add-japanese-localization
git rebase main
git push --set-upstream origin 325-add-japanese-localizationGo to the CopilotChat.nvim in your GitHub account, select your branch, and click the "Pull Request" button.
-
init.lua: Main module. Plugin initialization (
setup()), chat lifecycle (ask(),open(),close(),toggle(),reset()), save/load, and sticky prompt processing. -
client.lua: Copilot API client. Handles authentication, model listing, streaming requests, and tool call execution.
-
config.lua: Default configuration schema.
-
config/: Sub-configs for functions, mappings, prompts, and providers.
-
constants.lua: Shared constants (plugin name, roles).
-
ui/chat.lua: Chat window management. Creating, appending to, clearing, opening, closing, and focusing the chat window. Handles fold expressions and section parsing.
-
ui/overlay.lua: Overlay buffer used for displaying diff previews and other transient content.
-
ui/spinner.lua: Loading spinner indicator for the chat window.
-
prompts.lua: Prompt resolution, custom instruction loading, system prompt building, and sticky/resource/tool parsing from user input.
-
functions.lua: Built-in functions/tools exposed to the LLM (e.g., file editing, searching).
-
resources.lua: Resource handling for file and URL content retrieval with caching.
-
completion.lua: Completion source for the chat window (
@tools,/prompts,#resources,$models). -
select.lua: Selection strategies for providing context (visual selection, buffer, diagnostics, git diff, etc.).
-
tiktoken.lua: Token counting via native tiktoken library.
-
instructions/: System prompt templates injected into LLM conversations (edit formats, tool use instructions, custom instructions wrapper).
-
utils.lua: General utility functions.
-
utils/: Utility modules class.lua (OOP helper), curl.lua (HTTP requests), diff.lua (unified diff parsing and application), files.lua (file I/O and filetype detection), notify.lua (pub/sub notification system for status and message events) orderedmap.lua (insertion-ordered map), stringbuffer.lua (efficient string concatenation).
- health.lua:
:checkhealthintegration. Verifies commands, libraries, and Treesitter parsers.
