A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/chep/copilot-chat.el below:

chep/copilot-chat.el: Chat with Github copilot in Emacs !

This plugin allows you to chat with GitHub copilot.

Feel free to contribute, report issues or discuss new features.

MCP server experimental support

We use the mcp.el package to support MCP servers. Configure it and run copilot-chat-set-mcp-servers. It seems to work better with Claude models. Feedback is welcome.

When using gpt-4o model, you can now send images to Copilot. Open it in Emacs and add the buffer to the context like any other one.

Bug reports, PR and new ideas are very welcome.

Many of you won’t read this readme. And many of those who start reading won’t read more than a few lines. So I’ll write some tips here, at the beginning.

When using the org frontend, you can yank code blocks provided by Copilot just as you would use the kill ring. Here’s a simple configuration:

(use-package copilot-chat
  …
  :bind (:map global-map
            ("C-c C-y" . copilot-chat-yank)
            ("C-c M-y" . copilot-chat-yank-pop)
            ("C-c C-M-y" . (lambda () (interactive) (copilot-chat-yank-pop -1))))
  …)

In the copilot-chat buffer, you can use (or bind to a key) the interactive copilot-chat-goto-input function to place point at the beginning of the prompt area.

Calling copilot-chat-display with prefix argument will let you choose instance or create a new one.

You can use copilot-chat-save and copilot-chat-load to save/restore a chat with its history.

Copilot-chat is available on melpa :

M-x package-install RET copilot-chat RET

With use-package :

(use-package copilot-chat)
(use-package copilot-chat
  :straight (:host github :repo "chep/copilot-chat.el" :files ("*.el"))
  :after (request org markdown-mode))

Clone repository and eval files in Emacs.

You will need a GitHub account with access to copilot API. When sending the first prompt, you will need to authenticate to GitHub. Follow instructions and everything will be fine.

copilot-chat-backend can be set to 'curl (default) or 'request.

With curl, answers will be written token by token. Curl path can be set with the `copilot-chat-curl-program` variable. With request library, the text is written when all data is read and this can be long.

Several frontends are available. You can select your favorite one by setting the copilot-chat-frontend variable to 'org (default), 'markdown or 'shell-maker.

Try them and choose wisely.

You can use copilot to generate your commit messages :

(add-hook 'git-commit-setup-hook 'copilot-chat-insert-commit-message)

Or call manually (copilot-chat-insert-commit-message) when in the commit message buffer.

The proxy can be configured with the curl backend. For the emacs-request backend, please refer to the emacs-request documentation if you need to configure a proxy.

Use the variables copilot-chat-curl-proxy, copilot-chat-curl-proxy-user-pass, and copilot-chat-curl-proxy-insecure to set up a proxy. Refer to the documentation for each variable to learn how to use them.

Proxies have not been thoroughly tested yet, so there may be bugs. Many options are missing for HTTPS proxies. Please open an issue if you need additional features.

Start chatting by calling (copilot-chat-display) (alias (copilot-chat)). Type your question in the prompt, then press C-c C-c or C-c RET. You may need to authenticate to GitHub. Follow instructions.

You can select buffers that will be added as context in your prompt. Use copilot-chat-add-current-buffer and copilot-chat-del-current-buffer. You can also manage buffers by using (copilot-chat-list). In the list, selected buffer will be highlighted using copilot-chat-list-selected-buffer-face which inherit from font-lock-keyword-face.

Selected buffers will be sent with each prompt until you remove them.

You can call (copilot-chat-transient) to open transient menu. Almost all functions are accessible.

All variables can be customized using M-x customize-group RET copilot-chat RET.

Default prompts used by various commands:

Copilot Chat supports custom instructions from GitHub repository:

You can customize the appearance of the buffer list by modifying these faces:

This plugin is unofficial and based on Copilot Chat for neovim repository: https://github.com/CopilotC-Nvim/CopilotChat.nvim

The prompt for git commit messages comes from gpt-commit.

For GitHub copilot code completion in Emacs, checkout copilot.el


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4