[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-copilot-emacs--copilot.el":3,"tool-copilot-emacs--copilot.el":64},[4,17,25,39,48,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",138956,2,"2026-04-05T11:33:21",[13,14,15],"开发框架","Agent","语言模型","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":10,"last_commit_at":23,"category_tags":24,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,15],{"id":26,"name":27,"github_repo":28,"description_zh":29,"stars":30,"difficulty_score":10,"last_commit_at":31,"category_tags":32,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[33,34,35,36,14,37,15,13,38],"图像","数据工具","视频","插件","其他","音频",{"id":40,"name":41,"github_repo":42,"description_zh":43,"stars":44,"difficulty_score":45,"last_commit_at":46,"category_tags":47,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,3,"2026-04-04T04:44:48",[14,33,13,15,37],{"id":49,"name":50,"github_repo":51,"description_zh":52,"stars":53,"difficulty_score":45,"last_commit_at":54,"category_tags":55,"status":16},519,"PaddleOCR","PaddlePaddle\u002FPaddleOCR","PaddleOCR 是一款基于百度飞桨框架开发的高性能开源光学字符识别工具包。它的核心能力是将图片、PDF 等文档中的文字提取出来，转换成计算机可读取的结构化数据，让机器真正“看懂”图文内容。\n\n面对海量纸质或电子文档，PaddleOCR 解决了人工录入效率低、数字化成本高的问题。尤其在人工智能领域，它扮演着连接图像与大型语言模型（LLM）的桥梁角色，能将视觉信息直接转化为文本输入，助力智能问答、文档分析等应用场景落地。\n\nPaddleOCR 适合开发者、算法研究人员以及有文档自动化需求的普通用户。其技术优势十分明显：不仅支持全球 100 多种语言的识别，还能在 Windows、Linux、macOS 等多个系统上运行，并灵活适配 CPU、GPU、NPU 等各类硬件。作为一个轻量级且社区活跃的开源项目，PaddleOCR 既能满足快速集成的需求，也能支撑前沿的视觉语言研究，是处理文字识别任务的理想选择。",74913,"2026-04-05T10:44:17",[15,33,13,37],{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":45,"last_commit_at":62,"category_tags":63,"status":16},2181,"OpenHands","OpenHands\u002FOpenHands","OpenHands 是一个专注于 AI 驱动开发的开源平台，旨在让智能体（Agent）像人类开发者一样理解、编写和调试代码。它解决了传统编程中重复性劳动多、环境配置复杂以及人机协作效率低等痛点，通过自动化流程显著提升开发速度。\n\n无论是希望提升编码效率的软件工程师、探索智能体技术的研究人员，还是需要快速原型验证的技术团队，都能从中受益。OpenHands 提供了灵活多样的使用方式：既可以通过命令行（CLI）或本地图形界面在个人电脑上轻松上手，体验类似 Devin 的流畅交互；也能利用其强大的 Python SDK 自定义智能体逻辑，甚至在云端大规模部署上千个智能体并行工作。\n\n其核心技术亮点在于模块化的软件智能体 SDK，这不仅构成了平台的引擎，还支持高度可组合的开发模式。此外，OpenHands 在 SWE-bench 基准测试中取得了 77.6% 的优异成绩，证明了其解决真实世界软件工程问题的能力。平台还具备完善的企业级功能，支持与 Slack、Jira 等工具集成，并提供细粒度的权限管理，适合从个人开发者到大型企业的各类用户场景。",70612,"2026-04-05T11:12:22",[15,14,13,36],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":75,"owner_avatar_url":76,"owner_bio":77,"owner_company":78,"owner_location":78,"owner_email":78,"owner_twitter":78,"owner_website":78,"owner_url":79,"languages":80,"stars":85,"forks":86,"last_commit_at":87,"license":88,"difficulty_score":10,"env_os":89,"env_gpu":90,"env_ram":91,"env_deps":92,"category_tags":102,"github_topics":78,"view_count":10,"oss_zip_url":78,"oss_zip_packed_at":78,"status":16,"created_at":103,"updated_at":104,"faqs":105,"releases":140},3945,"copilot-emacs\u002Fcopilot.el","copilot.el","An unofficial Copilot plugin for Emacs.","copilot.el 是一款专为 Emacs 编辑器打造的 GitHub Copilot 非官方插件，旨在将强大的 AI 编程辅助能力无缝融入用户的开发工作流。它解决了开发者在编写代码时需要频繁切换上下文或手动查找示例的痛点，通过提供行内代码补全（幽灵文本）、交互式对话界面以及“下一步编辑建议”功能，显著提升编码效率与流畅度。\n\n这款工具特别适合习惯使用 Emacs 的软件开发者和技术研究人员。无论是日常业务逻辑编写，还是复杂的算法实现，copilot.el 都能提供实时的智能建议。其独特的技术亮点在于直接通过 `jsonrpc` 与官方的 Copilot 语言服务器通信，而非依赖标准的 LSP 客户端。这种设计不仅更好地适配了 Copilot 特有的非标准协议，还实现了跨缓冲区和项目的全局服务器共享，确保了响应速度与稳定性。只需简单的配置并登录账号，用户即可在熟悉的 Emacs 环境中享受顶级的 AI 结对编程体验。","[![JCS-ELPA](https:\u002F\u002Fraw.githubusercontent.com\u002Fjcs-emacs\u002Fbadges\u002Fmaster\u002Felpa\u002Fv\u002Fcopilot.svg)](https:\u002F\u002Fjcs-emacs.github.io\u002Fjcs-elpa\u002F#\u002Fcopilot)\n[![MELPA](http:\u002F\u002Fmelpa.org\u002Fpackages\u002Fcopilot-badge.svg)](http:\u002F\u002Fmelpa.org\u002F#\u002Fcopilot)\n[![MELPA Stable](http:\u002F\u002Fstable.melpa.org\u002Fpackages\u002Fcopilot-badge.svg)](http:\u002F\u002Fstable.melpa.org\u002F#\u002Fcopilot)\n[![CI](https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Factions\u002Fworkflows\u002Ftest.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Factions\u002Fworkflows\u002Ftest.yml)\n[![GitHub Sponsors](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fsponsors\u002Fbbatsov?style=flat&logo=github&label=Sponsors&color=ea4aaa)](https:\u002F\u002Fgithub.com\u002Fsponsors\u002Fbbatsov)\n\n# Copilot.el\n\nCopilot.el is an Emacs plugin for [GitHub Copilot][]. It provides inline\ncompletions (ghost text), an interactive chat interface, and Next Edit\nSuggestions — all powered by the official [@github\u002Fcopilot-language-server][].\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcopilot-emacs_copilot.el_readme_eb20e30e87a1.gif)\n\nThe plugin talks to the Copilot language server over JSON-RPC, using `jsonrpc.el`\ndirectly rather than going through an LSP client like eglot. This is a\ndeliberate choice — most of the Copilot protocol is non-standard LSP, and a\nsingle global server is shared across all buffers and projects. See\n[doc\u002Fdesign.md](doc\u002Fdesign.md) for the full rationale.\n\n> [!NOTE]\n>\n> You need access to [GitHub Copilot][] to use this plugin. The service introduced a free tier in early 2025.\n\n## Requirements\n\n`copilot.el` requires Emacs 27+ and the following packages (installed automatically from MELPA):\n\n- `editorconfig`\n- `jsonrpc`\n- `compat`\n- `track-changes`\n\n[@github\u002Fcopilot-language-server][] requires Node.js 22+.\n\n## Quick Start\n\n```elisp\n(use-package copilot\n  :ensure t\n  :hook (prog-mode . copilot-mode)\n  :bind (:map copilot-completion-map\n              (\"\u003Ctab>\" . copilot-accept-completion)\n              (\"TAB\" . copilot-accept-completion)\n              (\"C-\u003Ctab>\" . copilot-accept-completion-by-word)\n              (\"C-TAB\" . copilot-accept-completion-by-word)\n              (\"C-n\" . copilot-next-completion)\n              (\"C-p\" . copilot-previous-completion)))\n```\n\nThen run `M-x copilot-install-server` and `M-x copilot-login`. That's it!\n\n## Installation\n\n### MELPA\n\nThe simplest way to install `copilot.el` is from [MELPA](https:\u002F\u002Fmelpa.org\u002F#\u002Fcopilot):\n\n```elisp\n(use-package copilot\n  :ensure t)\n```\n\nOr `M-x package-install RET copilot RET`.\n\n### Emacs 30+ (use-package :vc)\n\n```elisp\n(use-package copilot\n  :vc (:url \"https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\"\n            :rev :newest\n            :branch \"main\"))\n```\n\n### Emacs 27-29 (straight \u002F quelpa)\n\n`straight.el`:\n\n```elisp\n(use-package copilot\n  :straight (:host github :repo \"copilot-emacs\u002Fcopilot.el\" :files (\"*.el\"))\n  :ensure t)\n```\n\n`quelpa` + `quelpa-use-package`:\n\n```elisp\n(use-package copilot\n  :quelpa (copilot :fetcher github\n                   :repo \"copilot-emacs\u002Fcopilot.el\"\n                   :branch \"main\"\n                   :files (\"*.el\")))\n```\n\n### Manual\n\nClone this repository, make sure the dependencies listed in [Requirements](#requirements) are installed, then:\n\n```elisp\n(add-to-list 'load-path \"\u002Fpath\u002Fto\u002Fcopilot.el\")\n(require 'copilot)\n```\n\n### Doom Emacs\n\n\u003Cdetails>\n\nAdd package definition to `~\u002F.doom.d\u002Fpackages.el`:\n\n```elisp\n(package! copilot\n  :recipe (:host github :repo \"copilot-emacs\u002Fcopilot.el\" :files (\"*.el\")))\n```\n\nConfigure copilot in `~\u002F.doom.d\u002Fconfig.el`:\n\n```elisp\n;; accept completion from copilot and fallback to company\n(use-package! copilot\n  :hook (prog-mode . copilot-mode)\n  :bind (:map copilot-completion-map\n              (\"\u003Ctab>\" . 'copilot-accept-completion)\n              (\"TAB\" . 'copilot-accept-completion)\n              (\"C-TAB\" . 'copilot-accept-completion-by-word)\n              (\"C-\u003Ctab>\" . 'copilot-accept-completion-by-word)))\n```\n\nStrongly recommend to enable `childframe` option in `company` module (`(company +childframe)`) to prevent overlay conflict.\n\nIf pressing tab to complete sometimes doesn't work you might want to bind completion to another key or try:\n\n```elisp\n(after! (evil copilot)\n  ;; Define the custom function that either accepts the completion or does the default behavior\n  (defun my\u002Fcopilot-tab-or-default ()\n    (interactive)\n    (if (and (bound-and-true-p copilot-mode)\n             ;; Add any other conditions to check for active copilot suggestions if necessary\n             )\n        (copilot-accept-completion)\n      (evil-insert 1))) ; Default action to insert a tab. Adjust as needed.\n\n  ;; Bind the custom function to \u003Ctab> in Evil's insert state\n  (evil-define-key 'insert 'global (kbd \"\u003Ctab>\") 'my\u002Fcopilot-tab-or-default))\n```\n\nIf you would love to configure indentation here, this is an example config that may work for you:\n\n```elisp\n(use-package! copilot\n  :hook (prog-mode . copilot-mode)\n  :bind (:map copilot-completion-map\n              (\"\u003Ctab>\" . 'copilot-accept-completion)\n              (\"TAB\" . 'copilot-accept-completion)\n              (\"C-TAB\" . 'copilot-accept-completion-by-word)\n              (\"C-\u003Ctab>\" . 'copilot-accept-completion-by-word)\n              (\"C-n\" . 'copilot-next-completion)\n              (\"C-p\" . 'copilot-previous-completion))\n\n  :config\n  (add-to-list 'copilot-indentation-alist '(prog-mode 2))\n  (add-to-list 'copilot-indentation-alist '(org-mode 2))\n  (add-to-list 'copilot-indentation-alist '(text-mode 2))\n  (add-to-list 'copilot-indentation-alist '(clojure-mode 2))\n  (add-to-list 'copilot-indentation-alist '(emacs-lisp-mode 2)))\n```\n\n\u003C\u002Fdetails>\n\n### Spacemacs\n\n\u003Cdetails>\n\nEdit your `~\u002F.spacemacs` to include the GitHub Copilot layer this will setup everything for you:\n\n```elisp\n;; ===================\n;; dotspacemacs\u002Flayers\n;; ===================\n\n;; add or uncomment the auto-completion layer\n;; add the GitHub Copilot layer\ndotspacemacs-configuration-layers\n'(\n  ...\n  auto-completion\n  github-copilot\n  ...\n )\n```\nFor details about the default bindings please refer to the Spacemacs documentation for the\ngithub-copilot layer.\n\n\u003C\u002Fdetails>\n\nAfter installing the package, run `M-x copilot-install-server` to install the language server, then `M-x copilot-login` to authenticate. You can verify everything works with `M-x copilot-diagnose` (`NotAuthorized` means you don't have a valid subscription).\n\n## Configuration\n\n### Completion trigger\n\nUse `copilot-mode` to automatically provide completions in a buffer:\n\n```elisp\n(add-hook 'prog-mode-hook 'copilot-mode)\n```\n\nOr enable it globally with `global-copilot-mode`:\n\n```elisp\n(global-copilot-mode)\n```\n\nTo customize when completions trigger, see `copilot-enable-predicates` and `copilot-disable-predicates`. To customize when completions are displayed, see `copilot-enable-display-predicates` and `copilot-disable-display-predicates`.\n\nAlternatively, you can call `copilot-complete` manually and use `copilot-clear-overlay` in `post-command-hook` to dismiss completions.\n\n### Chat\n\n`copilot-chat` opens an interactive chat with GitHub Copilot using the `conversation\u002F*` LSP methods. The chat buffer streams responses in real time and automatically provides the current buffer as context.\n\n```elisp\n;; Start a chat (or send a follow-up if one is already open)\nM-x copilot-chat\n\n;; Send selected code with an optional prompt\nM-x copilot-chat-send-region\n```\n\nKey bindings in the `*copilot-chat*` buffer:\n- **C-c RET** or **C-c C-c** — send a follow-up message\n- **C-c C-k** — cancel streaming, or reset if idle\n- **q** — quit the chat window\n\nCustomization:\n- **`copilot-chat-model`** — model to use for chat (default `nil`, meaning server default)\n\n> [!TIP]\n>\n> Install [`markdown-mode`](https:\u002F\u002Fgithub.com\u002Fjrblevin\u002Fmarkdown-mode) for rich markdown rendering (headings, code blocks, emphasis, etc.) in the chat buffer. Without it, only basic highlighting is used.\n\nFor a more feature-rich chat experience, take a look at [copilot-chat.el](https:\u002F\u002Fgithub.com\u002Fchep\u002Fcopilot-chat.el).\n\n> [!WARNING]\n>\n> `copilot-chat.el` (the chep package) and `copilot.el` both provide an Emacs feature called `copilot-chat`, so they **cannot be installed at the same time**. Having both will cause autoload errors such as \"failed to define function copilot-chat-display\". If you want to use the chat built into `copilot.el`, make sure `chep\u002Fcopilot-chat.el` is uninstalled, and vice versa.\n\n### Next Edit Suggestions (NES)\n\nNES predicts the next edit you'll want to make anywhere in the file, based on your recent editing patterns. Unlike inline completions (ghost text at the cursor), NES suggestions can replace or delete existing text at any location.\n\n> [!NOTE]\n>\n> NES requires `copilot-language-server` version 1.434.0 or newer. Run `M-x copilot-reinstall-server` to upgrade if needed.\n\nEnable `copilot-nes-mode` in a buffer to start receiving suggestions. It can coexist with `copilot-mode`:\n\n```elisp\n(add-hook 'prog-mode-hook #'copilot-nes-mode)\n```\n\nWhen a suggestion is pending:\n- **TAB** — accept the suggestion (jumps to it first if far away, applies on second press)\n- **C-g** — dismiss the suggestion\n\nCustomization variables:\n- **`copilot-nes-idle-delay`** — seconds of idle time before requesting a suggestion (default `0.5`)\n- **`copilot-nes-auto-dismiss-move-count`** — cursor movements before auto-dismissing (default `3`)\n- **`copilot-nes-auto-dismiss-distance`** — max lines between point and suggestion before auto-dismissing (default `40`)\n\n### Keybindings\n\n`copilot-mode` does not set any keybindings by default. Use `copilot-completion-map` (active while a completion overlay is visible) to bind keys:\n\n```elisp\n(keymap-set copilot-completion-map \"\u003Ctab>\" #'copilot-accept-completion)\n(keymap-set copilot-completion-map \"TAB\" #'copilot-accept-completion)\n(keymap-set copilot-completion-map \"C-\u003Ctab>\" #'copilot-accept-completion-by-word)\n(keymap-set copilot-completion-map \"C-TAB\" #'copilot-accept-completion-by-word)\n(keymap-set copilot-completion-map \"M-n\" #'copilot-next-completion)\n(keymap-set copilot-completion-map \"M-p\" #'copilot-previous-completion)\n```\n\n#### Fish-style keybindings\n\nIf you use `company-mode` or `corfu`, TAB is already taken. An alternative inspired by Fish shell avoids the conflict entirely — right-arrow accepts, and forward-word\u002Fend-of-line accept partially:\n\n```elisp\n(keymap-set copilot-completion-map \"\u003Cright>\" #'copilot-accept-completion)\n(keymap-set copilot-completion-map \"C-f\" #'copilot-accept-completion)\n(keymap-set copilot-completion-map \"M-\u003Cright>\" #'copilot-accept-completion-by-word)\n(keymap-set copilot-completion-map \"M-f\" #'copilot-accept-completion-by-word)\n(keymap-set copilot-completion-map \"C-e\" #'copilot-accept-completion-by-line)\n(keymap-set copilot-completion-map \"\u003Cend>\" #'copilot-accept-completion-by-line)\n(keymap-set copilot-completion-map \"M-n\" #'copilot-next-completion)\n(keymap-set copilot-completion-map \"M-p\" #'copilot-previous-completion)\n```\n\n#### Zap-style partial acceptance\n\nTo remap the built-in zap commands automatically whenever the overlay is visible:\n\n```elisp\n(keymap-set copilot-completion-map \"\u003Cremap> \u003Czap-to-char>\" #'copilot-accept-completion-to-char)\n(keymap-set copilot-completion-map \"\u003Cremap> \u003Czap-up-to-char>\" #'copilot-accept-completion-up-to-char)\n```\n\n### LSP settings\n\nYou can configure the underlying LSP settings via `copilot-lsp-settings`. The complete list of available options can be found\n[here](https:\u002F\u002Fgithub.com\u002Fgithub\u002Fcopilot-language-server-release?tab=readme-ov-file#configuration-management).\n\nHere we set the GitHub Enterprise server to `https:\u002F\u002Fexample2.ghe.com`, exchange the URL with your own server.\n\n```elisp\n(setopt copilot-lsp-settings '(:github-enterprise (:uri \"https:\u002F\u002Fexample2.ghe.com\"))) ;; allows changing the value without restarting the LSP\n(setq copilot-lsp-settings '(:github-enterprise (:uri \"https:\u002F\u002Fexample2.ghe.com\"))) ;; alternatively\n```\n\nYou have to restart the LSP (`M-x copilot-diagnose`) when using `setq` to change the value. When logging in, the URL for the authentication flow should be the same as the one set in `copilot-lsp-settings`.\n\n### Language detection\n\nCopilot.el detects the programming language of a buffer based on the major-mode\nname, stripping the `-mode` part. The resulting languageId should match the table\n[here](https:\u002F\u002Fcode.visualstudio.com\u002Fdocs\u002Flanguages\u002Fidentifiers#_known-language-identifiers).\nYou can add unusual major-mode mappings to `copilot-major-mode-alist`. Without\nthe proper language set suggestions may be of poorer quality.\n\n```elisp\n(add-to-list 'copilot-major-mode-alist '(\"enh-ruby\" . \"ruby\"))\n```\n\n### Network proxy\n\nFormat: `'(:host \"127.0.0.1\" :port 7890 :username \"user\" :password \"password\")`, where `:username` and `:password` are optional.\n\nFor example:\n\n```elisp\n(setq copilot-network-proxy '(:host \"127.0.0.1\" :port 7890))\n```\n\n### Handling server messages\n\n`copilot-on-request` registers a handler for incoming JSON-RPC requests from the language server. Return a JSON-serializable value as the result, or call `jsonrpc-error` for errors. [Read more](https:\u002F\u002Fwww.gnu.org\u002Fsoftware\u002Femacs\u002Fmanual\u002Fhtml_node\u002Felisp\u002FJSONRPC-Overview.html).\n\n```elisp\n;; Display desktop notification if Emacs is built with D-Bus\n(copilot-on-request\n 'window\u002FshowMessageRequest\n (lambda (msg) (notifications-notify :title \"Emacs Copilot\" :body (plist-get msg :message))))\n```\n\n`copilot-on-notification` registers a listener for incoming LSP notifications.\n\n```elisp\n(copilot-on-notification\n  'window\u002FlogMessage\n  (lambda (msg) (message (plist-get msg :message))))\n```\n\n## Commands\n\n> [!TIP]\n>\n> You don't need to memorize the list — just type `M-x copilot-` followed by TAB, or use the Copilot menu in the menubar.\n\n| Command | Description |\n|---------|-------------|\n| **Setup** | |\n| `copilot-install-server` | Install the language server |\n| `copilot-uninstall-server` | Remove the installed language server |\n| `copilot-reinstall-server` | Re-install the language server |\n| `copilot-login` | Log in to GitHub Copilot |\n| `copilot-logout` | Log out from GitHub Copilot |\n| `copilot-diagnose` | Restart the server and show diagnostic info |\n| `copilot-select-completion-model` | Choose which model to use for completions |\n| `copilot-chat-select-model` | Choose which model to use for chat |\n| **Completion** | |\n| `copilot-mode` | Toggle automatic completions in the current buffer |\n| `copilot-complete` | Trigger a completion at point |\n| `copilot-panel-complete` | Show a panel buffer with multiple completion suggestions |\n| `copilot-accept-completion` | Accept the current completion |\n| `copilot-accept-completion-by-word` | Accept the next N words (prefix arg) |\n| `copilot-accept-completion-by-line` | Accept the next N lines (prefix arg) |\n| `copilot-accept-completion-by-sentence` | Accept the next N sentences (prefix arg) |\n| `copilot-accept-completion-by-paragraph` | Accept the next N paragraphs (prefix arg) |\n| `copilot-accept-completion-to-char` | Accept through a character (inclusive, like `zap-to-char`) |\n| `copilot-accept-completion-up-to-char` | Accept up to a character (exclusive, like `zap-up-to-char`) |\n| `copilot-clear-overlay` | Dismiss the completion overlay |\n| **Navigation** | |\n| `copilot-next-completion` | Cycle to the next completion |\n| `copilot-previous-completion` | Cycle to the previous completion |\n| **Chat** | |\n| `copilot-chat` | Open Copilot Chat and send a message |\n| `copilot-chat-send` | Send a follow-up message in the current chat |\n| `copilot-chat-send-region` | Send the selected region as context with an optional prompt |\n| `copilot-chat-stop` | Cancel streaming, or reset the conversation if idle |\n| `copilot-chat-reset` | Destroy the current conversation and clear the chat buffer |\n| **Next Edit Suggestions** | |\n| `copilot-nes-mode` | Toggle NES in the current buffer |\n| `copilot-nes-accept` | Accept (or jump to) the current NES suggestion |\n| `copilot-nes-dismiss` | Dismiss the current NES suggestion |\n\n## Customization\n\n> [!TIP]\n>\n> Use \u003Ckbd>M-x\u003C\u002Fkbd> `customize-group` \u003Ckbd>RET\u003C\u002Fkbd> `copilot` to browse all available\n> configuration options and their documentation.\n\nA few commonly tweaked variables:\n\n- **`copilot-idle-delay`** — Seconds to wait before triggering completion (default `0`). Set to `nil` to disable automatic completion entirely.\n- **`copilot-lsp-server-version`** — Pin a specific [@github\u002Fcopilot-language-server][] version (`nil` means latest).\n- **`copilot-enable-predicates`** \u002F **`copilot-disable-predicates`** — Control when `copilot-mode` requests completions.\n- **`copilot-enable-display-predicates`** \u002F **`copilot-disable-display-predicates`** — Control when completions are shown.\n- **`copilot-clear-overlay-ignore-commands`** — Commands that won't dismiss the overlay.\n- **`copilot-indentation-alist`** — Override indentation width per major mode.\n- **`copilot-enable-parentheses-balancer`** — Post-process completions to balance parentheses in Lisp modes (default `t`). Set to `nil` to use raw server completions.\n\n## Protocol Support\n\n`copilot.el` communicates with [@github\u002Fcopilot-language-server][] over JSON-RPC using the LSP protocol plus Copilot-specific extensions. The table below shows the current coverage.\n\n### Client-to-Server Requests\n\n| Method | Status | Notes |\n|--------|--------|-------|\n| `initialize` | Supported | Sends `rootUri`, `workspaceFolders`, and editor info |\n| `shutdown` | Supported | Clean shutdown before exit |\n| `textDocument\u002FinlineCompletion` | Supported | Core completion mechanism |\n| `workspace\u002FexecuteCommand` | Supported | Executes server-side commands on accept |\n| `signInInitiate` \u002F `signInConfirm` \u002F `checkStatus` \u002F `signOut` | Supported | Authentication flow |\n| `copilot\u002Fmodels` | Supported | Lists available completion models |\n| `getPanelCompletions` | Supported | Multiple suggestions in a panel buffer |\n| `conversation\u002Fcreate` | Supported | Start a new chat conversation |\n| `conversation\u002Fturn` | Supported | Send a follow-up chat message |\n| `conversation\u002Fdestroy` | Supported | End a chat conversation |\n| `textDocument\u002FcopilotInlineEdit` | Supported | Next Edit Suggestions (NES) |\n\n### Client-to-Server Notifications\n\n| Method | Status | Notes |\n|--------|--------|-------|\n| `initialized` | Supported | |\n| `exit` | Supported | Sent after `shutdown` |\n| `textDocument\u002FdidOpen` | Supported | |\n| `textDocument\u002FdidClose` | Supported | |\n| `textDocument\u002FdidChange` | Supported | Incremental sync |\n| `textDocument\u002FdidFocus` | Supported | |\n| `textDocument\u002FdidShowCompletion` | Supported | Telemetry when overlay is displayed |\n| `textDocument\u002FdidPartiallyAcceptCompletion` | Supported | Telemetry for partial acceptance |\n| `textDocument\u002FdidShowInlineEdit` | Supported | Telemetry when NES overlay is displayed |\n| `workspace\u002FdidChangeConfiguration` | Supported | Sent on settings change |\n| `workspace\u002FdidChangeWorkspaceFolders` | Supported | Dynamic workspace roots |\n| `$\u002FcancelRequest` | Supported | Cancels stale completion requests |\n| `textDocument\u002FdidSave` | Not yet | |\n| `notebookDocument\u002F*` | Not yet | |\n\n### Server-to-Client Requests\n\n| Method | Status | Notes |\n|--------|--------|-------|\n| `window\u002FshowMessageRequest` | Supported | Prompts via `completing-read` |\n| `window\u002FshowDocument` | Supported | Opens URIs in browser or Emacs |\n| `conversation\u002Fcontext` | Supported | Provides editor context for chat |\n\n### Server-to-Client Notifications\n\n| Method | Status | Notes |\n|--------|--------|-------|\n| `window\u002FlogMessage` | Supported | Logged to `*copilot-language-server-log*` |\n| `didChangeStatus` | Supported | Shown in mode-line |\n| `$\u002Fprogress` | Supported | Progress shown in mode-line |\n| `PanelSolution` \u002F `PanelSolutionsDone` | Supported | Panel completion results |\n\nExtensible via `copilot-on-request` and `copilot-on-notification` for any messages not handled above.\n\n## Known Issues\n\n### Wrong Position of Other Completion Popups\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcopilot-emacs_copilot.el_readme_d765e2364b0c.png)\n\nThis is an example of using together with the default frontend of\n`company-mode`. Because both `company-mode` and `copilot.el` use overlays to show\ncompletions, the conflict is inevitable. The recommended solution is to use\n`company-box` (only available on GUI), which is based on child frames rather than\noverlays.\n\nAfter using `company-box`, you get:\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcopilot-emacs_copilot.el_readme_4ceb4582ad1c.png)\n\nIn other editors (e.g. `VS Code`, `PyCharm`), completions from Copilot and other sources cannot show at the same time.\nIn `copilot.el` they are allowed to coexist, so you can choose the better one at any time.\n\n### Cursor Jumps to End of Line When Typing\n\nIf you are using `whitespace-mode`, make sure to remove `newline-mark` from `whitespace-style`.\n\n## FAQ\n\n### Do I need a paid GitHub Copilot subscription?\n\nNot necessarily. GitHub introduced a [free tier](https:\u002F\u002Fgithub.com\u002Ffeatures\u002Fcopilot#pricing) for Copilot in early 2025 that includes a limited number of completions per month. A paid subscription (Individual or Business) removes these limits.\n\n### TAB doesn't accept the completion\n\nThis is usually caused by another package binding TAB in a way that takes\npriority. Common culprits include `company-mode`, `corfu`, `yasnippet`, and Evil\nmode. A few things to check:\n\n1. **Bind both `\u003Ctab>` and `TAB`.** In GUI Emacs these are different events —\n   `\u003Ctab>` is the function key and `TAB` is the `C-i` character. Some modes only\n   intercept one of them. The [Quick Start](#quick-start) example binds both.\n2. **Use the fish-style keybindings.** If TAB is hopelessly taken by another\n   package, bind acceptance to `\u003Cright>` \u002F `C-f` instead. See\n   [Fish-style keybindings](#fish-style-keybindings).\n3. **Doom Emacs users** — see the [Doom Emacs](#doom-emacs) installation section\n   for a workaround using a custom Evil insert-state binding.\n\n### Can I use `copilot-complete` without enabling `copilot-mode`?\n\nYes. You can call `M-x copilot-complete` manually in any buffer — it will start\nthe server and open the document automatically. Use `copilot-clear-overlay` (or\nsimply type) to dismiss the suggestion. This is useful if you prefer on-demand\ncompletions rather than automatic ones.\n\n### Completions are slow or not appearing\n\nA few things to try:\n\n1. **Run `M-x copilot-diagnose`** — it restarts the server and prints diagnostic\n   info. Look for `NotAuthorized` (subscription issue) or connection errors.\n2. **Check your network** — the language server needs to reach GitHub's API.  If\n   you're behind a proxy, configure `copilot-network-proxy`.\n3. **Large files** — buffers over `copilot-max-char` characters (default 100 000)\n   are skipped. You can raise the limit, but very large files will always be\n   slower.\n4. **Tune `copilot-idle-delay`** — the default is `0` (immediate). A small delay\n   (e.g. `0.2`) reduces server load when typing quickly.\n\n### How do I disable Copilot in certain modes or buffers?\n\nUse `copilot-disable-predicates` to add functions that return `t` when Copilot\nshould stay quiet:\n\n```elisp\n;; Disable in org-mode\n(add-to-list 'copilot-disable-predicates\n             (lambda () (derived-mode-p 'org-mode)))\n```\n\nOr simply don't add `copilot-mode` to the hooks of modes you want to exclude.\nIf you use `global-copilot-mode`, the predicate approach is the way to go.\n\n### Parentheses are unbalanced in Lisp completions\n\nCopilot.el includes a parentheses balancer that post-processes completions in\nLisp modes (`emacs-lisp-mode`, `clojure-mode`, `scheme-mode`, etc.) to fix\nunbalanced delimiters. It is enabled by default. If you still see issues,\nmake sure `copilot-enable-parentheses-balancer` is `t`, or file a bug report\nwith the completion text and buffer context.\n\nIf the balancer is causing problems for your workflow, you can disable it:\n\n```elisp\n(setopt copilot-enable-parentheses-balancer nil)\n```\n\n### How do I select a different completion model?\n\nRun `M-x copilot-select-completion-model` to interactively choose from the\nmodels available on your subscription. The selection is saved in\n`copilot-completion-model`. Set it to `nil` to revert to the server default.\n\n**Note:** Only models with a \"completion\" scope are available for inline\ncompletions. Models like Claude, Gemini, and others that you may see in VS\nCode's chat UI are chat\u002Fedit-only and cannot be used for inline completions.\nThis is a server-side limitation, not a copilot.el restriction. Currently\nGitHub only offers a single completion model (`gpt-41-copilot`).\n\nTo select a chat model, run `M-x copilot-chat-select-model`. Many more models\nare available for chat (Claude, Gemini, GPT-4o, etc.). The selection is saved\nin `copilot-chat-model`.\n\n## Reporting Bugs\n\n- Make sure you have restarted your Emacs (and rebuild the plugin if necessary) after updating the plugin.\n- Async request errors (e.g. cancelled completions) are logged to `*Messages*` automatically. Check there first for clues.\n- For deeper investigation, enable event logging by customizing `copilot-log-max` (to e.g. 1000) and enable debug log `(setq copilot-server-args '(\"--stdio\" \"--debug\"))`, then paste related logs from the `*copilot events*`, `*copilot stderr*` and `*copilot-language-server-log*` buffers.\n- If an exception is thrown, please also paste the stack trace (use `M-x toggle-debug-on-error` to enable stack trace).\n\n## Development\n\nSee [doc\u002Fdesign.md](doc\u002Fdesign.md) for an overview of the architecture and key design decisions.\n\n### Running Tests\n\nUnit tests (requires [eask](https:\u002F\u002Femacs-eask.github.io\u002F)):\n\n```sh\neask test buttercup\n```\n\n### Linting\n\n```sh\neask lint checkdoc\neask lint indent\n```\n\n### Integration Testing\n\nThere's a manual integration test in `dev\u002Fintegration-smoke.el` that connects to the real Copilot language server and verifies the `textDocument\u002FinlineCompletion` round-trip. It requires the server to be installed and authenticated.\n\n```sh\nemacs --batch -L . -l dev\u002Fintegration-smoke.el\n```\n\n## History\n\ncopilot.el was started in March 2022. At the time there was no public Copilot\nserver package — the only way to get one was to extract the Node.js agent\nbundled inside [copilot.vim][]. Early versions of copilot.el reverse-engineered\nthe agent's JSON-RPC protocol from copilot.vim and shipped a copy of that agent\nin the repository, updating it whenever a new copilot.vim release appeared.\n\nIn early 2025, GitHub published the official\n[@github\u002Fcopilot-language-server][] on npm. copilot.el migrated to this open\nserver, dropping the copilot.vim dependency entirely. The switch also enabled\nnewer protocol features like `textDocument\u002FinlineCompletion` (replacing the\nlegacy `getCompletions`), Copilot Chat, and Next Edit Suggestions.\n\n## Thanks\n\nThese projects helped make copilot.el possible:\n\n- [copilot.vim][] — the original reference implementation whose bundled agent powered copilot.el for its first three years\n- \u003Chttps:\u002F\u002Fgithub.com\u002FTommyX12\u002Fcompany-tabnine\u002F> — inspiration for the overlay-based completion UX\n- \u003Chttps:\u002F\u002Fgithub.com\u002Fcryptobadger\u002Fflight-attendant.el>\n- [@github\u002Fcopilot-language-server][]\n\n## Team\n\nCurrent maintainer: [@bbatsov][].\n\nRetired maintainers: [@zerolfx][], [@emil-vdw][], [@jcs090218][], [@rakotomandimby][].\n\n## Supporting the Development\n\n`copilot.el` is built and maintained by volunteers in their spare time. If you find it useful,\nplease consider supporting its continued development.\n\nHere are the ways in which you can support the project:\n\n- [GitHub Sponsors](https:\u002F\u002Fgithub.com\u002Fsponsors\u002Fbbatsov) (recurring or one-time donations)\n- [Patreon](https:\u002F\u002Fwww.patreon.com\u002Fbbatsov) (recurring donations)\n- [PayPal](https:\u002F\u002Fwww.paypal.me\u002Fbbatsov) (one-time donations)\n\n## License\n\ncopilot.el is distributed under the MIT license.\n\nCopyright © 2022-2026 copilot-emacs maintainers and\n[contributors](https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fcontributors).\n\n\u003C!-- Links -->\n\n[@bbatsov]: https:\u002F\u002Fgithub.com\u002Fbbatsov\n[@emil-vdw]: https:\u002F\u002Fgithub.com\u002Femil-vdw\n[@jcs090218]: https:\u002F\u002Fgithub.com\u002Fjcs090218\n[@rakotomandimby]: https:\u002F\u002Fgithub.com\u002Frakotomandimby\n[@zerolfx]: https:\u002F\u002Fgithub.com\u002Fzerolfx\n\n[GitHub Copilot]: https:\u002F\u002Fgithub.com\u002Ffeatures\u002Fcopilot\n[copilot.vim]: https:\u002F\u002Fgithub.com\u002Fgithub\u002Fcopilot.vim\n[@github\u002Fcopilot-language-server]: https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@github\u002Fcopilot-language-server\n","[![JCS-ELPA](https:\u002F\u002Fraw.githubusercontent.com\u002Fjcs-emacs\u002Fbadges\u002Fmaster\u002Felpa\u002Fv\u002Fcopilot.svg)](https:\u002F\u002Fjcs-emacs.github.io\u002Fjcs-elpa\u002F#\u002Fcopilot)\n[![MELPA](http:\u002F\u002Fmelpa.org\u002Fpackages\u002Fcopilot-badge.svg)](http:\u002F\u002Fmelpa.org\u002F#\u002Fcopilot)\n[![MELPA Stable](http:\u002F\u002Fstable.melpa.org\u002Fpackages\u002Fcopilot-badge.svg)](http:\u002F\u002Fstable.melpa.org\u002F#\u002Fcopilot)\n[![CI](https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Factions\u002Fworkflows\u002Ftest.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Factions\u002Fworkflows\u002Ftest.yml)\n[![GitHub Sponsors](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fsponsors\u002Fbbatsov?style=flat&logo=github&label=Sponsors&color=ea4aaa)](https:\u002F\u002Fgithub.com\u002Fsponsors\u002Fbbatsov)\n\n# Copilot.el\n\nCopilot.el 是一个用于 [GitHub Copilot][] 的 Emacs 插件。它提供了内联补全（幽灵文本）、交互式聊天界面以及下一次编辑建议——所有这些功能都由官方的 [@github\u002Fcopilot-language-server][] 提供支持。\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcopilot-emacs_copilot.el_readme_eb20e30e87a1.gif)\n\n该插件通过 JSON-RPC 与 Copilot 语言服务器通信，直接使用 `jsonrpc.el` 而不是通过像 eglot 这样的 LSP 客户端。这是一个有意的选择——Copilot 协议的大部分内容并非标准的 LSP，并且所有缓冲区和项目共享同一个全局服务器。完整的理由请参阅 [doc\u002Fdesign.md](doc\u002Fdesign.md)。\n\n> [!NOTE]\n>\n> 您需要访问 [GitHub Copilot][] 才能使用此插件。该服务在 2025 年初推出了免费层级。\n\n## 需求\n\n`copilot.el` 需要 Emacs 27 或更高版本，以及以下软件包（可从 MELPA 自动安装）：\n\n- `editorconfig`\n- `jsonrpc`\n- `compat`\n- `track-changes`\n\n[@github\u002Fcopilot-language-server][] 则需要 Node.js 22 或更高版本。\n\n## 快速入门\n\n```elisp\n(use-package copilot\n  :ensure t\n  :hook (prog-mode . copilot-mode)\n  :bind (:map copilot-completion-map\n              (\"\u003Ctab>\" . copilot-accept-completion)\n              (\"TAB\" . copilot-accept-completion)\n              (\"C-\u003Ctab>\" . copilot-accept-completion-by-word)\n              (\"C-TAB\" . copilot-accept-completion-by-word)\n              (\"C-n\" . copilot-next-completion)\n              (\"C-p\" . copilot-previous-completion)))\n```\n\n然后运行 `M-x copilot-install-server` 和 `M-x copilot-login`。就完成了！\n\n## 安装\n\n### MELPA\n\n安装 `copilot.el` 最简单的方式是从 [MELPA](https:\u002F\u002Fmelpa.org\u002F#\u002Fcopilot) 获取：\n\n```elisp\n(use-package copilot\n  :ensure t)\n```\n\n或者使用 `M-x package-install RET copilot RET`。\n\n### Emacs 30+ (use-package :vc)\n\n```elisp\n(use-package copilot\n  :vc (:url \"https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\"\n            :rev :newest\n            :branch \"main\"))\n```\n\n### Emacs 27-29 (straight \u002F quelpa)\n\n`straight.el`:\n\n```elisp\n(use-package copilot\n  :straight (:host github :repo \"copilot-emacs\u002Fcopilot.el\" :files (\"*.el\"))\n  :ensure t)\n```\n\n`quelpa` + `quelpa-use-package`:\n\n```elisp\n(use-package copilot\n  :quelpa (copilot :fetcher github\n                   :repo \"copilot-emacs\u002Fcopilot.el\"\n                   :branch \"main\"\n                   :files (\"*.el\")))\n```\n\n### 手动安装\n\n克隆本仓库，确保已安装 [需求](#requirements) 中列出的依赖项，然后：\n\n```elisp\n(add-to-list 'load-path \"\u002Fpath\u002Fto\u002Fcopilot.el\")\n(require 'copilot)\n```\n\n### Doom Emacs\n\n\u003Cdetails>\n\n将包定义添加到 `~\u002F.doom.d\u002Fpackages.el`：\n\n```elisp\n(package! copilot\n  :recipe (:host github :repo \"copilot-emacs\u002Fcopilot.el\" :files (\"*.el\")))\n```\n\n在 `~\u002F.doom.d\u002Fconfig.el` 中配置 Copilot：\n\n```elisp\n;; 接受 Copilot 的补全并回退到 company\n(use-package! copilot\n  :hook (prog-mode . copilot-mode)\n  :bind (:map copilot-completion-map\n              (\"\u003Ctab>\" . 'copilot-accept-completion)\n              (\"TAB\" . 'copilot-accept-completion)\n              (\"C-TAB\" . 'copilot-accept-completion-by-word)\n              (\"C-\u003Ctab>\" . 'copilot-accept-completion-by-word)))\n```\n\n强烈建议在 company 模块中启用 `childframe` 选项 (`(company +childframe)`)，以防止覆盖冲突。\n\n如果按 Tab 键有时无法完成补全，您可以将其绑定到其他键，或尝试：\n\n```elisp\n(after! (evil copilot)\n  ;; 定义一个自定义函数，要么接受补全，要么执行默认行为\n  (defun my\u002Fcopilot-tab-or-default ()\n    (interactive)\n    (if (and (bound-and-true-p copilot-mode)\n             ;; 如有必要，可以添加其他条件来检查 Copilot 是否有活跃的建议\n             )\n        (copilot-accept-completion)\n      (evil-insert 1))) ; 默认操作是插入一个制表符。可根据需要调整。\n\n  ;; 将自定义函数绑定到 Evil 的插入模式下的 \u003Ctab>\n  (evil-define-key 'insert 'global (kbd \"\u003Ctab>\") 'my\u002Fcopilot-tab-or-default))\n```\n\n如果您希望在此处配置缩进，以下是一个可能适合您的配置示例：\n\n```elisp\n(use-package! copilot\n  :hook (prog-mode . copilot-mode)\n  :bind (:map copilot-completion-map\n              (\"\u003Ctab>\" . 'copilot-accept-completion)\n              (\"TAB\" . 'copilot-accept-completion)\n              (\"C-TAB\" . 'copilot-accept-completion-by-word)\n              (\"C-\u003Ctab>\" . 'copilot-accept-completion-by-word)\n              (\"C-n\" . 'copilot-next-completion)\n              (\"C-p\" . 'copilot-previous-completion))\n\n  :config\n  (add-to-list 'copilot-indentation-alist '(prog-mode 2))\n  (add-to-list 'copilot-indentation-alist '(org-mode 2))\n  (add-to-list 'copilot-indentation-alist '(text-mode 2))\n  (add-to-list 'copilot-indentation-alist '(clojure-mode 2))\n  (add-to-list 'copilot-indentation-alist '(emacs-lisp-mode 2)))\n```\n\n\u003C\u002Fdetails>\n\n### Spacemacs\n\n\u003Cdetails>\n\n编辑您的 `~\u002F.spacemacs` 文件，加入 GitHub Copilot 层，这将为您自动完成所有设置：\n\n```elisp\n;; ===================\n;; dotspacemacs\u002Flayers\n;; ===================\n\n;; 添加或取消注释自动补全层\n;; 添加 GitHub Copilot 层\ndotspacemacs-configuration-layers\n'(\n  ...\n  auto-completion\n  github-copilot\n  ...\n )\n```\n有关默认绑定的详细信息，请参阅 Spacemacs 关于 GitHub Copilot 层的文档。\n\n\u003C\u002Fdetails>\n\n安装完包后，运行 `M-x copilot-install-server` 来安装语言服务器，然后运行 `M-x copilot-login` 进行认证。您可以通过 `M-x copilot-diagnose` 来验证一切是否正常工作（如果显示“NotAuthorized”，则表示您没有有效的订阅）。\n\n## 配置\n\n### 补全触发\n\n使用 `copilot-mode` 可以在缓冲区中自动提供补全：\n\n```elisp\n(add-hook 'prog-mode-hook 'copilot-mode)\n```\n\n或者使用 `global-copilot-mode` 在全局范围内启用：\n\n```elisp\n(global-copilot-mode)\n```\n\n若要自定义补全何时触发，请查看 `copilot-enable-predicates` 和 `copilot-disable-predicates`。若要自定义补全何时显示，请查看 `copilot-enable-display-predicates` 和 `copilot-disable-display-predicates`。\n\n此外，您也可以手动调用 `copilot-complete`，并在 `post-command-hook` 中使用 `copilot-clear-overlay` 来清除补全提示。\n\n### 聊天\n\n`copilot-chat` 使用 `conversation\u002F*` LSP 方法打开与 GitHub Copilot 的交互式聊天。聊天缓冲区会实时流式显示响应，并自动提供当前缓冲区作为上下文。\n\n```elisp\n;; 开始聊天（或在已有聊天窗口时发送后续消息）\nM-x copilot-chat\n\n;; 发送选中的代码并附带可选提示\nM-x copilot-chat-send-region\n```\n\n`*copilot-chat*` 缓冲区中的快捷键：\n- **C-c RET** 或 **C-c C-c** — 发送后续消息\n- **C-c C-k** — 取消流式输出，或在空闲时重置\n- **q** — 退出聊天窗口\n\n自定义选项：\n- **`copilot-chat-model`** — 用于聊天的模型（默认为 `nil`，即使用服务器默认值）\n\n> [!TIP]\n>\n> 安装 [`markdown-mode`](https:\u002F\u002Fgithub.com\u002Fjrblevin\u002Fmarkdown-mode) 可以在聊天缓冲区中实现丰富的 Markdown 渲染效果（标题、代码块、强调等）。如果没有安装该模式，则仅使用基本的语法高亮。\n\n若需更丰富的聊天体验，请查看 [copilot-chat.el](https:\u002F\u002Fgithub.com\u002Fchep\u002Fcopilot-chat.el)。\n\n> [!WARNING]\n>\n> `copilot-chat.el`（chep 包）和 `copilot.el` 都提供了名为 `copilot-chat` 的 Emacs 功能，因此它们 **不能同时安装**。同时安装会导致自动加载错误，例如“无法定义函数 copilot-chat-display”。如果希望使用 `copilot.el` 内置的聊天功能，请确保卸载 `chep\u002Fcopilot-chat.el`，反之亦然。\n\n### 下一步编辑建议 (NES)\n\nNES 根据您最近的编辑模式，预测您在文件中任何位置接下来想要进行的编辑。与内联补全（光标处的幽灵文本）不同，NES 建议可以替换或删除文件中任意位置的现有文本。\n\n> [!NOTE]\n>\n> NES 需要 `copilot-language-server` 版本 1.434.0 或更高。如有需要，请运行 `M-x copilot-reinstall-server` 进行升级。\n\n在缓冲区中启用 `copilot-nes-mode` 即可开始接收建议。它可与 `copilot-mode` 共存：\n\n```elisp\n(add-hook 'prog-mode-hook #'copilot-nes-mode)\n```\n\n当有建议待处理时：\n- **TAB** — 接受建议（如果距离较远会先跳转到建议位置，第二次按下则应用）\n- **C-g** — 撤销建议\n\n自定义变量：\n- **`copilot-nes-idle-delay`** — 在请求建议之前需要等待的空闲时间（秒）（默认为 `0.5`）\n- **`copilot-nes-auto-dismiss-move-count`** — 光标移动多少次后自动撤销建议（默认为 `3`）\n- **`copilot-nes-auto-dismiss-distance`** — 光标与建议之间的最大行数，超过此值则自动撤销建议（默认为 `40`）\n\n### 快捷键绑定\n\n`copilot-mode` 默认不设置任何快捷键。您可以使用 `copilot-completion-map`（在补全覆盖层可见时生效）来绑定按键：\n\n```elisp\n(keymap-set copilot-completion-map \"\u003Ctab>\" #'copilot-accept-completion)\n(keymap-set copilot-completion-map \"TAB\" #'copilot-accept-completion)\n(keymap-set copilot-completion-map \"C-\u003Ctab>\" #'copilot-accept-completion-by-word)\n(keymap-set copilot-completion-map \"C-TAB\" #'copilot-accept-completion-by-word)\n(keymap-set copilot-completion-map \"M-n\" #'copilot-next-completion)\n(keymap-set copilot-completion-map \"M-p\" #'copilot-previous-completion)\n```\n\n#### Fish 风格的快捷键绑定\n\n如果您使用 `company-mode` 或 `corfu`，`TAB` 键可能已被占用。一种受 Fish shell 启发的替代方案可以完全避免冲突——右箭头接受完整建议，而 `forward-word`\u002F`end-of-line` 则部分接受建议：\n\n```elisp\n(keymap-set copilot-completion-map \"\u003Cright>\" #'copilot-accept-completion)\n(keymap-set copilot-completion-map \"C-f\" #'copilot-accept-completion)\n(keymap-set copilot-completion-map \"M-\u003Cright>\" #'copilot-accept-completion-by-word)\n(keymap-set copilot-completion-map \"M-f\" #'copilot-accept-completion-by-word)\n(keymap-set copilot-completion-map \"C-e\" #'copilot-accept-completion-by-line)\n(keymap-set copilot-completion-map \"\u003Cend>\" #'copilot-accept-completion-by-line)\n(keymap-set copilot-completion-map \"M-n\" #'copilot-next-completion)\n(keymap-set copilot-completion-map \"M-p\" #'copilot-previous-completion)\n```\n\n#### Zap 风格的部分接受方式\n\n为了在覆盖层可见时自动重新映射内置的 zap 命令：\n\n```elisp\n(keymap-set copilot-completion-map \"\u003Cremap> \u003Czap-to-char>\" #'copilot-accept-completion-to-char)\n(keymap-set copilot-completion-map \"\u003Cremap> \u003Czap-up-to-char>\" #'copilot-accept-completion-up-to-char)\n```\n\n### LSP 设置\n\n您可以通过 `copilot-lsp-settings` 配置底层的 LSP 设置。可用选项的完整列表请参见\n[此处](https:\u002F\u002Fgithub.com\u002Fgithub\u002Fcopilot-language-server-release?tab=readme-ov-file#configuration-management)。\n\n以下示例将 GitHub Enterprise 服务器设置为 `https:\u002F\u002Fexample2.ghe.com`，请将其替换为您自己的服务器地址。\n\n```elisp\n(setopt copilot-lsp-settings '(:github-enterprise (:uri \"https:\u002F\u002Fexample2.ghe.com\"))) ;; 允许在不重启 LSP 的情况下更改值\n(setq copilot-lsp-settings '(:github-enterprise (:uri \"https:\u002F\u002Fexample2.ghe.com\"))) ;; 或者\n```\n\n使用 `setq` 更改值时，必须重启 LSP（`M-x copilot-diagnose`）。登录时，身份验证流程的 URL 应与 `copilot-lsp-settings` 中设置的 URL 一致。\n\n### 语言检测\n\nCopilot.el 根据缓冲区的主要模式名称检测编程语言，去掉 `-mode` 部分。生成的 languageId 应与 [此处](https:\u002F\u002Fcode.visualstudio.com\u002Fdocs\u002Flanguages\u002Fidentifiers#_known-language-identifiers) 的表格匹配。您可以将不常见的主要模式映射添加到 `copilot-major-mode-alist` 中。如果没有正确设置语言，建议的质量可能会较差。\n\n```elisp\n(add-to-list 'copilot-major-mode-alist '(\"enh-ruby\" . \"ruby\"))\n```\n\n### 网络代理\n\n格式：`'(:host \"127.0.0.1\" :port 7890 :username \"user\" :password \"password\")`，其中 `:username` 和 `:password` 是可选的。\n\n例如：\n\n```elisp\n(setq copilot-network-proxy '(:host \"127.0.0.1\" :port 7890))\n```\n\n### 处理服务器消息\n\n`copilot-on-request` 注册一个处理器，用于接收来自语言服务器的 JSON-RPC 请求。返回值应为可序列化的 JSON 数据，或调用 `jsonrpc-error` 报告错误。[更多信息](https:\u002F\u002Fwww.gnu.org\u002Fsoftware\u002Femacs\u002Fmanual\u002Fhtml_node\u002Felisp\u002FJSONRPC-Overview.html)。\n\n```elisp\n;; 如果 Emacs 编译时支持 D-Bus，则显示桌面通知\n(copilot-on-request\n 'window\u002FshowMessageRequest\n (lambda (msg) (notifications-notify :title \"Emacs Copilot\" :body (plist-get msg :message))))\n```\n\n`copilot-on-notification` 注册一个监听器，用于接收传入的 LSP 通知。\n\n```elisp\n(copilot-on-notification\n  'window\u002FlogMessage\n  (lambda (msg) (message (plist-get msg :message))))\n```\n\n## 命令\n\n> [!TIP]\n>\n> 你不必记住这些命令——只需输入 `M-x copilot-` 后按 TAB 键，或使用菜单栏中的 Copilot 菜单即可。\n\n| 命令 | 描述 |\n|---------|-------------|\n| **设置** | |\n| `copilot-install-server` | 安装语言服务器 |\n| `copilot-uninstall-server` | 卸载已安装的语言服务器 |\n| `copilot-reinstall-server` | 重新安装语言服务器 |\n| `copilot-login` | 登录 GitHub Copilot |\n| `copilot-logout` | 从 GitHub Copilot 注销 |\n| `copilot-diagnose` | 重启服务器并显示诊断信息 |\n| `copilot-select-completion-model` | 选择用于补全的模型 |\n| `copilot-chat-select-model` | 选择用于聊天的模型 |\n| **补全** | |\n| `copilot-mode` | 切换当前缓冲区中的自动补全功能 |\n| `copilot-complete` | 在光标位置触发补全 |\n| `copilot-panel-complete` | 显示包含多个补全建议的面板缓冲区 |\n| `copilot-accept-completion` | 接受当前补全 |\n| `copilot-accept-completion-by-word` | 接受接下来的 N 个单词（前缀参数） |\n| `copilot-accept-completion-by-line` | 接受接下来的 N 行（前缀参数） |\n| `copilot-accept-completion-by-sentence` | 接受接下来的 N 句子（前缀参数） |\n| `copilot-accept-completion-by-paragraph` | 接受接下来的 N 段落（前缀参数） |\n| `copilot-accept-completion-to-char` | 接受到某个字符为止（包含该字符，类似于 `zap-to-char`） |\n| `copilot-accept-completion-up-to-char` | 接受到某个字符之前（不包含该字符，类似于 `zap-up-to-char`） |\n| `copilot-clear-overlay` | 关闭补全覆盖层 |\n| **导航** | |\n| `copilot-next-completion` | 切换到下一个补全建议 |\n| `copilot-previous-completion` | 切换到上一个补全建议 |\n| **聊天** | |\n| `copilot-chat` | 打开 Copilot Chat 并发送消息 |\n| `copilot-chat-send` | 在当前聊天中发送后续消息 |\n| `copilot-chat-send-region` | 将选中的区域作为上下文连同可选提示一起发送 |\n| `copilot-chat-stop` | 取消流式传输，或在空闲时重置对话 |\n| `copilot-chat-reset` | 销毁当前对话并清空聊天缓冲区 |\n| **下一步编辑建议** | |\n| `copilot-nes-mode` | 切换当前缓冲区中的 NES 功能 |\n| `copilot-nes-accept` | 接受（或跳转到）当前的 NES 建议 |\n| `copilot-nes-dismiss` | 忽略当前的 NES 建议 |\n\n## 自定义\n\n> [!TIP]\n>\n> 使用 \u003Ckbd>M-x\u003C\u002Fkbd> `customize-group` \u003Ckbd>RET\u003C\u002Fkbd> `copilot` 来浏览所有可用的配置选项及其文档。\n\n以下是一些常用的可调整变量：\n\n- **`copilot-idle-delay`** — 触发补全前的等待时间（默认为 `0` 秒）。将其设置为 `nil` 可完全禁用自动补全。\n- **`copilot-lsp-server-version`** — 锁定特定的 [@github\u002Fcopilot-language-server][] 版本（`nil` 表示最新版本）。\n- **`copilot-enable-predicates`** \u002F **`copilot-disable-predicates`** — 控制 `copilot-mode` 何时请求补全。\n- **`copilot-enable-display-predicates`** \u002F **`copilot-disable-display-predicates`** — 控制何时显示补全结果。\n- **`copilot-clear-overlay-ignore-commands`** — 不会关闭覆盖层的命令。\n- **`copilot-indentation-alist`** — 根据主要模式覆盖缩进宽度。\n- **`copilot-enable-parentheses-balancer`** — 对 Lisp 模式下的补全结果进行后处理以平衡括号（默认为 `t`）。将其设置为 `nil` 可使用原始服务器补全结果。\n\n## 协议支持\n\n`copilot.el` 使用 LSP 协议以及 Copilot 特有的扩展，通过 JSON-RPC 与 [@github\u002Fcopilot-language-server][] 进行通信。下表显示了当前的支持情况。\n\n### 客户端到服务器请求\n\n| 方法 | 状态 | 备注 |\n|--------|--------|-------|\n| `initialize` | 支持 | 发送 `rootUri`、`workspaceFolders` 和编辑器信息 |\n| `shutdown` | 支持 | 退出前的正常关闭 |\n| `textDocument\u002FinlineCompletion` | 支持 | 核心补全机制 |\n| `workspace\u002FexecuteCommand` | 支持 | 在接受时执行服务器端命令 |\n| `signInInitiate` \u002F `signInConfirm` \u002F `checkStatus` \u002F `signOut` | 支持 | 认证流程 |\n| `copilot\u002Fmodels` | 支持 | 列出可用的补全模型 |\n| `getPanelCompletions` | 支持 | 面板缓冲区中的多个建议 |\n| `conversation\u002Fcreate` | 支持 | 开始新的聊天对话 |\n| `conversation\u002Fturn` | 支持 | 发送后续聊天消息 |\n| `conversation\u002Fdestroy` | 支持 | 结束聊天对话 |\n| `textDocument\u002FcopilotInlineEdit` | 支持 | 下一步编辑建议（NES） |\n\n### 客户端到服务器通知\n\n| 方法 | 状态 | 备注 |\n|--------|--------|-------|\n| `initialized` | 支持 | |\n| `exit` | 支持 | 在 `shutdown` 之后发送 |\n| `textDocument\u002FdidOpen` | 支持 | |\n| `textDocument\u002FdidClose` | 支持 | |\n| `textDocument\u002FdidChange` | 支持 | 增量同步 |\n| `textDocument\u002FdidFocus` | 支持 | |\n| `textDocument\u002FdidShowCompletion` | 支持 | 当覆盖层显示时的遥测数据 |\n| `textDocument\u002FdidPartiallyAcceptCompletion` | 支持 | 部分接受时的遥测数据 |\n| `textDocument\u002FdidShowInlineEdit` | 支持 | 当 NES 覆盖层显示时的遥测数据 |\n| `workspace\u002FdidChangeConfiguration` | 支持 | 在设置更改时发送 |\n| `workspace\u002FdidChangeWorkspaceFolders` | 支持 | 动态工作区根目录 |\n| `$\u002FcancelRequest` | 支持 | 取消过时的补全请求 |\n| `textDocument\u002FdidSave` | 尚未支持 | |\n| `notebookDocument\u002F*` | 尚未支持 | |\n\n### 服务器到客户端请求\n\n| 方法 | 状态 | 备注 |\n|--------|--------|-------|\n| `window\u002FshowMessageRequest` | 支持 | 通过 `completing-read` 提示用户 |\n| `window\u002FshowDocument` | 支持 | 在浏览器或 Emacs 中打开 URI |\n| `conversation\u002Fcontext` | 支持 | 为聊天提供编辑器上下文 |\n\n### 服务器到客户端通知\n\n| 方法 | 状态 | 备注 |\n|--------|--------|-------|\n| `window\u002FlogMessage` | 支持 | 记录到 `*copilot-language-server-log*` 日志中 |\n| `didChangeStatus` | 支持 | 在模式行中显示 |\n| `$\u002Fprogress` | 支持 | 在模式行中显示进度 |\n| `PanelSolution` \u002F `PanelSolutionsDone` | 支持 | 面板补全结果 |\n\n可通过 `copilot-on-request` 和 `copilot-on-notification` 对上述未处理的消息进行扩展。\n\n## 已知问题\n\n### 其他补全弹出窗口位置错误\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcopilot-emacs_copilot.el_readme_d765e2364b0c.png)\n\n这是一个与 `company-mode` 默认前端一起使用的示例。由于 `company-mode` 和 `copilot.el` 都使用覆盖层来显示补全结果，冲突是不可避免的。推荐的解决方案是使用 `company-box`（仅限 GUI），它基于子框架而非覆盖层。\n\n使用 `company-box` 后，效果如下：\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcopilot-emacs_copilot.el_readme_4ceb4582ad1c.png)\n\n在其他编辑器（如 `VS Code`、`PyCharm`）中，Copilot 和其他来源的补全结果不能同时显示。而在 `copilot.el` 中，它们可以共存，因此你可以随时选择更好的补全结果。\n\n### 光标在输入时跳到行尾\n\n如果您正在使用 `whitespace-mode`，请确保从 `whitespace-style` 中移除 `newline-mark`。\n\n## 常见问题解答\n\n### 我需要付费的 GitHub Copilot 订阅吗？\n\n不一定。GitHub 在 2025 年初推出了 Copilot 的[免费层级](https:\u002F\u002Fgithub.com\u002Ffeatures\u002Fcopilot#pricing)，包含每月有限数量的补全建议。付费订阅（个人或企业）则取消了这些限制。\n\n### TAB 键无法接受补全建议\n\n这通常是由其他包以更高优先级绑定了 TAB 键导致的。常见的“罪魁祸首”包括 `company-mode`、`corfu`、`yasnippet` 和 Evil 模式。您可以尝试以下几点：\n\n1. **同时绑定 `\u003Ctab>` 和 `TAB`。** 在 GUI Emacs 中，它们是不同的事件——`\u003Ctab>` 是功能键，而 `TAB` 是 `C-i` 字符。有些模式只拦截其中一种。[快速入门](#quick-start) 示例中同时绑定了两者。\n2. **使用 Fish 风格的快捷键。** 如果 TAB 键被其他包彻底占用，可以将接受补全的按键改为 `\u003Cright>` 或 `C-f`。详情请参阅[Fish 风格的快捷键](#fish-style-keybindings)。\n3. **Doom Emacs 用户**——请参阅[Doom Emacs](#doom-emacs) 安装部分，了解如何通过自定义 Evil 插入模式绑定来解决此问题。\n\n### 是否可以在不启用 `copilot-mode` 的情况下使用 `copilot-complete`？\n\n可以。您可以在任何缓冲区中手动调用 `M-x copilot-complete`，它会自动启动服务器并打开文档。使用 `copilot-clear-overlay`（或直接输入内容）即可关闭提示。如果您更倾向于按需触发补全而非自动补全，这种方式非常实用。\n\n### 补全速度慢或未出现\n\n您可以尝试以下几种方法：\n\n1. **运行 `M-x copilot-diagnose`**——它会重启服务器并输出诊断信息。请注意是否有 `NotAuthorized`（订阅问题）或连接错误。\n2. **检查网络连接**——语言服务器需要访问 GitHub 的 API。如果您处于代理之后，请配置 `copilot-network-proxy`。\n3. **大文件**——超过 `copilot-max-char` 字符数（默认 100,000）的缓冲区会被跳过。您可以提高此限制，但非常大的文件始终会较慢。\n4. **调整 `copilot-idle-delay`**——默认值为 `0`（立即触发）。设置一个小的延迟（例如 `0.2` 秒）可以在快速输入时降低服务器负载。\n\n### 如何在某些模式或缓冲区中禁用 Copilot？\n\n使用 `copilot-disable-predicates` 添加函数，当返回 `t` 时 Copilot 将保持静默：\n\n```elisp\n;; 在 org-mode 中禁用\n(add-to-list 'copilot-disable-predicates\n             (lambda () (derived-mode-p 'org-mode)))\n```\n\n或者直接不要将 `copilot-mode` 加入您希望排除的模式钩子中。如果您使用 `global-copilot-mode`，那么使用谓词方式是最合适的。\n\n### Lisp 补全中的括号不平衡\n\nCopilot.el 包含一个括号平衡器，在 Lisp 模式（`emacs-lisp-mode`、`clojure-mode`、`scheme-mode` 等）中对补全结果进行后处理，以修复不平衡的分隔符。该功能默认启用。如果仍然遇到问题，请确保 `copilot-enable-parentheses-balancer` 设置为 `t`，否则请附上补全文本和缓冲区上下文提交 bug 报告。\n\n如果括号平衡器影响了您的工作流程，可以将其禁用：\n\n```elisp\n(setopt copilot-enable-parentheses-balancer nil)\n```\n\n### 如何选择不同的补全模型？\n\n运行 `M-x copilot-select-completion-model` 可以交互式地从您订阅可用的模型中选择。选择结果会保存在 `copilot-completion-model` 中。将其设置为 `nil` 可恢复到服务器默认值。\n\n**注意：** 只有具有“补全”范围的模型才可用于内联补全。像 Claude、Gemini 等您可能在 VS Code 的聊天界面中看到的模型，仅适用于聊天\u002F编辑模式，无法用于内联补全。这是服务器端的限制，而非 copilot.el 的限制。目前 GitHub 仅提供单一的补全模型（`gpt-41-copilot`）。\n\n要选择聊天模型，请运行 `M-x copilot-chat-select-model`。聊天模式下可用的模型更多（Claude、Gemini、GPT-4o 等）。选择结果会保存在 `copilot-chat-model` 中。\n\n## 报告 Bug\n\n- 更新插件后，请务必重启 Emacs，并在必要时重新构建插件。\n- 异步请求错误（例如补全被取消）会自动记录到 `*Messages*` 缓冲区中。请先查看那里以获取线索。\n- 若要进行更深入的调查，可以通过自定义 `copilot-log-max`（例如设置为 1000）启用事件日志，并通过 `(setq copilot-server-args '(\"--stdio\" \"--debug\"))` 启用调试日志，然后粘贴来自 `*copilot events*`、`*copilot stderr*` 和 `*copilot-language-server-log*` 缓冲区的相关日志。\n- 如果抛出异常，请同时粘贴堆栈跟踪信息（使用 `M-x toggle-debug-on-error` 启用堆栈跟踪）。\n\n## 开发\n\n有关架构和关键设计决策的概述，请参阅 [doc\u002Fdesign.md](doc\u002Fdesign.md)。\n\n### 运行测试\n\n单元测试（需要 [eask](https:\u002F\u002Femacs-eask.github.io\u002F)）：\n\n```sh\neask test buttercup\n```\n\n### 代码检查\n\n```sh\neask lint checkdoc\neask lint indent\n```\n\n### 集成测试\n\n`dev\u002Fintegration-smoke.el` 中包含一个手动集成测试，它会连接到真实的 Copilot 语言服务器，并验证 `textDocument\u002FinlineCompletion` 的往返通信。此测试需要安装并认证服务器。\n\n```sh\nemacs --batch -L . -l dev\u002Fintegration-smoke.el\n```\n\n## 历史\n\ncopilot.el 项目始于 2022 年 3 月。当时还没有公开的 Copilot 服务器包——唯一的方法是从 [copilot.vim][] 内部提取 Node.js 客户端。早期版本的 copilot.el 通过对 copilot.vim 中 JSON-RPC 协议的逆向工程，复制了一份客户端代码并存储在仓库中，每次 copilot.vim 发布新版本时都会更新该副本。\n\n2025 年初，GitHub 在 npm 上发布了官方的 [@github\u002Fcopilot-language-server][]。copilot.el 迁移到这个开源服务器，完全移除了对 copilot.vim 的依赖。此次切换还带来了新的协议特性，如 `textDocument\u002FinlineCompletion`（取代了旧版的 `getCompletions`）、Copilot 聊天以及下一阶段的编辑建议等功能。\n\n## 致谢\n\n以下项目帮助实现了 copilot.el：\n\n- [copilot.vim][] — 最初的参考实现，其捆绑的客户端驱动了 copilot.el 前三年的发展。\n- \u003Chttps:\u002F\u002Fgithub.com\u002FTommyX12\u002Fcompany-tabnine\u002F> — 基于覆盖层的补全用户体验的灵感来源。\n- \u003Chttps:\u002F\u002Fgithub.com\u002Fcryptobadger\u002Fflight-attendant.el>\n- [@github\u002Fcopilot-language-server][]\n\n## 团队\n\n现任维护者：[@bbatsov][]。\n\n已卸任的维护者：[@zerolfx][]、[@emil-vdw][]、[@jcs090218][]、[@rakotomandimby][]。\n\n## 支持项目发展\n\n`copilot.el` 由志愿者在业余时间开发和维护。如果您觉得它很有用，请考虑支持其持续发展。\n\n以下是您可以支持该项目的方式：\n\n- [GitHub Sponsors](https:\u002F\u002Fgithub.com\u002Fsponsors\u002Fbbatsov)（定期或一次性捐赠）\n- [Patreon](https:\u002F\u002Fwww.patreon.com\u002Fbbatsov)（定期捐赠）\n- [PayPal](https:\u002F\u002Fwww.paypal.me\u002Fbbatsov)（一次性捐赠）\n\n## 许可证\n\ncopilot.el 采用 MIT 许可证进行分发。\n\n版权所有 © 2022–2026 copilot-emacs 维护者及[贡献者](https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fcontributors)。\n\n\u003C!-- 链接 -->\n\n[@bbatsov]: https:\u002F\u002Fgithub.com\u002Fbbatsov\n[@emil-vdw]: https:\u002F\u002Fgithub.com\u002Femil-vdw\n[@jcs090218]: https:\u002F\u002Fgithub.com\u002Fjcs090218\n[@rakotomandimby]: https:\u002F\u002Fgithub.com\u002Frakotomandimby\n[@zerolfx]: https:\u002F\u002Fgithub.com\u002Fzerolfx\n\n[GitHub Copilot]: https:\u002F\u002Fgithub.com\u002Ffeatures\u002Fcopilot\n[copilot.vim]: https:\u002F\u002Fgithub.com\u002Fgithub\u002Fcopilot.vim\n[@github\u002Fcopilot-language-server]: https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@github\u002Fcopilot-language-server","# Copilot.el 快速上手指南\n\nCopilot.el 是一个 Emacs 插件，用于在编辑器中集成 GitHub Copilot 功能。它提供行内代码补全（幽灵文本）、交互式聊天界面以及下一步编辑建议（NES）。\n\n## 环境准备\n\n在开始之前，请确保您的系统满足以下要求：\n\n*   **Emacs**: 版本 27 或更高。\n*   **Node.js**: 版本 22 或更高（用于运行 Copilot 语言服务器）。\n*   **GitHub Copilot 订阅**: 您需要拥有有效的 GitHub Copilot 访问权限（该服务已于 2025 年初推出免费层级）。\n*   **依赖包**: 以下 Emacs 包会在安装时自动从 MELPA 获取：\n    *   `editorconfig`\n    *   `jsonrpc`\n    *   `compat`\n    *   `track-changes`\n\n## 安装步骤\n\n### 1. 配置包管理器\n\n推荐使用 `use-package` 进行配置。如果您使用 MELPA（最简便的方式），请在配置文件（如 `init.el`）中添加以下内容：\n\n```elisp\n(use-package copilot\n  :ensure t\n  :hook (prog-mode . copilot-mode)\n  :bind (:map copilot-completion-map\n              (\"\u003Ctab>\" . copilot-accept-completion)\n              (\"TAB\" . copilot-accept-completion)\n              (\"C-\u003Ctab>\" . copilot-accept-completion-by-word)\n              (\"C-TAB\" . copilot-accept-completion-by-word)\n              (\"C-n\" . copilot-next-completion)\n              (\"C-p\" . copilot-previous-completion)))\n```\n\n> **注意**：如果您使用的是 Doom Emacs 或 Spacemacs，请参考原文中的特定配置章节进行适配。\n\n### 2. 安装语言服务器\n\n重启 Emacs 或重新加载配置文件后，执行以下命令安装后端语言服务器：\n\n```text\nM-x copilot-install-server\n```\n\n### 3. 登录认证\n\n服务器安装完成后，执行以下命令登录您的 GitHub 账户：\n\n```text\nM-x copilot-login\n```\n\n按照提示在浏览器中完成授权即可。\n\n### 4. 验证安装\n\n您可以运行诊断命令来确认一切正常：\n\n```text\nM-x copilot-diagnose\n```\n\n如果显示 `NotAuthorized`，请检查您的订阅状态或重新登录。\n\n## 基本使用\n\n安装并登录后，Copilot.el 将在编程模式（`prog-mode`）下自动激活。\n\n### 行内补全 (Inline Completions)\n当您在编写代码时，灰色的“幽灵文本”会自动出现作为建议。\n*   **接受建议**: 按下 `\u003CTab>` 键。\n*   **按词接受**: 按下 `C-\u003CTab>`。\n*   **切换建议**: 使用 `C-n` (下一个) 或 `C-p` (上一个)。\n\n### 交互式聊天 (Chat)\n您可以直接与 Copilot 对话以获取代码解释或生成代码片段。\n*   **打开聊天窗口**: `M-x copilot-chat`\n*   **发送选中代码**: 选中代码区域后，执行 `M-x copilot-chat-send-region`。\n*   **常用快捷键** (在聊天缓冲区):\n    *   `C-c RET`: 发送跟进消息。\n    *   `C-c C-k`: 取消流式输出。\n    *   `q`: 关闭聊天窗口。\n\n> **提示**: 建议安装 `markdown-mode` 包，以便在聊天窗口中获得更好的 Markdown 渲染效果（如代码高亮、标题格式等）。\n\n### 下一步编辑建议 (NES)\nNES 功能会根据您最近的编辑模式，预测您在文件任何位置的下一步操作（包括替换或删除现有文本）。\n*   **启用**: 在配置中添加 `(add-hook 'prog-mode-hook #'copilot-nes-mode)`。\n*   **接受建议**: 当建议出现时，按下 `\u003CTab>` 键（如果光标距离较远，第一次按下会跳转，第二次按下应用）。\n*   **拒绝建议**: 按下 `C-g`。","一位资深后端工程师正在 Emacs 中重构一个遗留的 Python 数据处理模块，需要快速补全复杂的正则表达式和重复的样板代码。\n\n### 没有 copilot.el 时\n- **频繁切换上下文**：为了确认标准库函数的参数顺序或正则语法，不得不离开编辑器去浏览器搜索文档，打断心流。\n- **手动输入样板代码**：编写重复的日志记录、异常捕获块和数据序列化逻辑时，只能靠肌肉记忆逐行敲击，效率低下且易出错。\n- **调试成本高**：在处理复杂字符串匹配时，往往写完后运行报错才发现语法细节有误，需要反复修改试错。\n- **思维中断**：在构思算法逻辑时，因繁琐的语法细节（如缩进、括号匹配）而被迫停顿，导致整体编码节奏拖沓。\n\n### 使用 copilot.el 后\n- **智能行内补全**：copilot.el 直接以“幽灵文本”形式在光标处预测并显示整行甚至整块代码，工程师只需按 Tab 键即可采纳，无需查阅文档。\n- **自动生成样板**：输入函数签名或注释后，工具自动补全完整的异常处理结构和数据转换逻辑，将机械性打字时间减少 80%。\n- **实时语法校正**：在编写正则表达式时，copilot.el 能根据上下文即时提供正确的语法建议，显著降低运行时错误率。\n- **流畅的逻辑表达**：开发者可以专注于业务逻辑的设计，让 copilot.el 负责处理缩进、括号等语法细节，保持编码思路的连贯性。\n\ncopilot.el 将 Emacs 用户从繁琐的语法记忆中解放出来，实现了“所想即所得”的高效编程体验。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcopilot-emacs_copilot.el_68c11899.png","copilot-emacs","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fcopilot-emacs_9b1e9f13.png","",null,"https:\u002F\u002Fgithub.com\u002Fcopilot-emacs",[81],{"name":82,"color":83,"percentage":84},"Emacs Lisp","#c065db",100,2294,171,"2026-03-31T07:14:02","MIT","Linux, macOS, Windows","不需要 GPU，基于云端 API","未说明",{"notes":93,"python":94,"dependencies":95},"该工具是 Emacs 插件，依赖官方的 GitHub Copilot 语言服务器（通过 Node.js 运行）。需要有效的 GitHub Copilot 订阅（2025 年初推出了免费层级）。安装后需运行 `M-x copilot-install-server` 安装语言服务器，并运行 `M-x copilot-login` 进行认证。不支持本地模型运行，所有推理在云端完成。","不需要 Python",[96,97,98,99,100,101],"Emacs 27+","Node.js 22+","editorconfig","jsonrpc","compat","track-changes",[15,36],"2026-03-27T02:49:30.150509","2026-04-06T07:11:47.631163",[106,111,116,121,126,131,136],{"id":107,"question_zh":108,"answer_zh":109,"source_url":110},18007,"如何将 copilot.el 安装到 MELPA？","copilot 现在已支持通过 MELPA 安装。您可以直接使用包管理器（如 use-package）进行安装，无需手动克隆仓库。安装命令示例：\n(use-package copilot\n  :ensure t)","https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fissues\u002F120",{"id":112,"question_zh":113,"answer_zh":114,"source_url":115},18008,"启动 Emacs 时遇到 'jsonrpc-error: request id=1 failed:, (jsonrpc-error-message . Timed out)' 错误怎么办？","这通常是因为 Emacs 无法正确找到 Node.js 环境变量。解决方案是在配置中引入 exec-path-from-shell 包来初始化环境变量。配置示例如下：\n(use-package exec-path-from-shell \n  :ensure t)\n\n(use-package copilot \n :straight (:host github :repo \"copilot-emacs\u002Fcopilot.el\" :files (\"*.el\"))\n  :init  (exec-path-from-shell-initialize)\n)\n关键步骤是添加 :init (exec-path-from-shell-initialize)。","https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fissues\u002F204",{"id":117,"question_zh":118,"answer_zh":119,"source_url":120},18009,"遇到 'Error code 32603. Request getCompletions failed with message: No instance of has been registered' 错误如何解决？","该错误通常由设置 '(copilot-idle-delay 0.5) 引起。解决方法是移除该配置行，或者将其设置为其他值。如果必须使用该变量，请确保不要在初始化阶段以可能导致冲突的方式设置它。","https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fissues\u002F17",{"id":122,"question_zh":123,"answer_zh":124,"source_url":125},18010,"copilot.el 是否支持 GitHub Copilot Chat 功能？","是的，已有初步实现。可以通过拉取请求 #446 获取聊天支持。安装后，使用 M-x copilot-chat 开始对话，使用 M-x copilot-chat-send-region 发送代码上下文。建议尝试该 PR 并反馈使用情况。","https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fissues\u002F199",{"id":127,"question_zh":128,"answer_zh":129,"source_url":130},18011,"Copilot 补全时自动添加了多余的空格或制表符导致缩进混乱，如何处理？","这是一个已知问题，社区建议参考 editorconfig-emacs 的处理方式（具体见 editorconfig.el 第 177 行逻辑）来优化缩进处理。维护者已确认修复方案有效，更新到最新版本即可解决大部分对齐问题。","https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fissues\u002F7",{"id":132,"question_zh":133,"answer_zh":134,"source_url":135},18012,"Copilot 随机停止工作，重启模式后只能短暂恢复，报错 'Document for URI could not be found'，怎么办？","此问题表现为 Agent 进程意外退出（status 9）且无法识别当前文档 URI。虽然具体根因复杂，但临时缓解方法是禁用并重新启用 copilot-mode。建议检查是否与其他修改 buffer 内容的插件冲突，并确保运行的是最新版本的 copilot.el，因为后续版本对此类连接稳定性做了改进。","https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fissues\u002F181",{"id":137,"question_zh":138,"answer_zh":139,"source_url":115},18013,"如何验证 Node.js 环境是否正确配置以运行 copilot.el？","可以手动运行 Node agent 脚本来验证环境。在终端中进入 copilot.el 目录并执行：node dist\u002Fagent.js。如果该命令能成功启动并输出日志（如 'Agent service starting'），说明 Node 环境正常；如果失败，则需检查 Node 版本（需 16+）及依赖安装情况。",[141,146,151,156,161],{"id":142,"version":143,"summary_zh":144,"released_at":145},108456,"v0.5.0","### 新特性\n\n- 使用 `conversation\u002F*` LSP 方法，新增 Copilot Chat 支持（`copilot-chat`、`copilot-chat-send`、`copilot-chat-send-region`、`copilot-chat-reset`）。([#446](https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F446))\n- 通过 `textDocument\u002FcopilotInlineEdit` 添加下一次编辑建议功能（`copilot-nes-mode`）。NES 会根据最近的编辑模式，在文件中的任何位置预测可能的编辑内容。([#447](https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F447))\n- 新增 `copilot-chat-stop` 命令，用于取消正在进行的流式传输。\n- 在模式行中显示聊天的流式传输状态指示器。\n- 在聊天回复后显示后续建议。\n- 在聊天缓冲区中内联显示错误信息。\n- 在可用时，于聊天缓冲区中使用 `markdown-mode` 的 GFM 语法高亮。\n- 向 Copilot 模式菜单添加“聊天”、“NES”、“面板完成”、“清除覆盖”、“选择补全模型”和“重新安装服务器”选项。\n- 添加用于报告 Bug 和提出功能请求的 GitHub 问题模板。\n\n### 变更\n\n- 为 `copilot--async-request` 添加默认错误处理程序，以便异步失败情况（例如被取消的补全）会被记录到 `*Messages*` 中，而不是被静默忽略。\n- 移除未使用的 `copilot-server-log-level` defcustom 定义（已废弃代码——没有任何地方读取它）。\n- 改进 `copilot-log-max` 的文档字符串，以解释 `*copilot events*` 缓冲区的作用。\n- 将 `copilot--satisfy-predicates` 从宏转换为函数，以简化代码。\n\n### Bug 修复\n\n- 修复聊天 `conversation\u002Fcreate` 请求将 `allSkills` 发送为字符串数组而非布尔值的问题，该问题导致在 `copilot-language-server` v1.436.0 及以上版本上出现模式验证错误。([#452](https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fissues\u002F452))\n- 修复当从包装命令（如 lambda 表达式或用户自定义函数）调用 `copilot-complete` 时，若命令名称不以 `copilot-` 开头，则补全会立即被取消的问题。([#453](https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fissues\u002F453))\n- 修复聊天无法显示较新服务器版本回复的问题。([#459](https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fissues\u002F459))\n- 修复 `window\u002FshowDocument` 处理程序中，`external` 参数的 `:json-false` 被视为真值的问题。\n- 规范化 `didChangeStatus` 处理程序中的 `:json-false` 忙碌标志。([#457](https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fissues\u002F457))\n- 对服务器响应中的 `:json-null` 进行防护。\n- 在空闲定时器路径中清除 `copilot--completion-initiated-p` 标志，以防止状态过时。([#454](https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fissues\u002F454))\n- 当 `copilot-max-char-warning-disable` 不为 nil 时，抑制 `copilot-max-char` 警告。","2026-03-16T21:36:11",{"id":147,"version":148,"summary_zh":149,"released_at":150},108457,"v0.4.0","### 新特性\n\n- 在 LSP 初始化期间发送工作区文件夹（`rootUri` 和 `workspaceFolders`），并在遇到新的项目根目录时动态通知服务器。这提升了多根工作区的补全质量。\n- 添加 `copilot-completion-model` 选项和 `copilot-select-completion-model` 命令，用于选择用于补全的 AI 模型。（[#382](https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fissues\u002F382)）\n- 添加 `copilot-enable-parentheses-balancer` 选项，以控制是否对 Lisp 补全结果进行括号平衡后处理（默认启用）。\n- 添加 `copilot-accept-completion-by-sentence` 命令。\n- 添加 `copilot-accept-completion-up-to-char` 和 `copilot-accept-completion-to-char` 命令，类似于 `zap-up-to-char` 和 `zap-to-char`。\n- 添加 `copilot-clear-overlay-on-commands` 用户选项，以便在执行特定命令（如 `beginning-of-visual-line`）前清除覆盖层。\n- 通过 `completing-read` 处理 `window\u002FshowMessageRequest` 服务器请求，并使用 `window\u002FshowDocument` 在浏览器或 Emacs 中打开 URI。\n- 处理 `didChangeStatus` 服务器通知，在模式行中显示 Copilot 状态（正常、警告、错误、未激活）。\n- 处理 `$\u002Fprogress` 服务器通知，在模式行中显示长时间运行操作（如索引）的进度。\n- 当请求新补全或关闭覆盖层时，发送 `$\u002FcancelRequest`，以便服务器停止处理过时的进行中请求。\n- 执行干净的 LSP 关闭流程（`shutdown` 请求 + `exit` 通知），而不是直接杀死服务器进程。\n- 添加 `copilot-on-request` 和 `copilot-on-notification`，用于用户自定义的服务器消息处理器。\n- 引入 buttercup 测试框架，并为核心功能编写了全面的测试用例。\n\n### 变更\n\n- `copilot--lsp-settings-changed` 现在发送 `workspace\u002FdidChangeConfiguration`，而不是重启服务器。\n- 移除 JSON-RPC 请求中不必要的 `:dummy` 占位参数。\n- 从旧版 `getCompletions` API 迁移到标准的 `textDocument\u002FinlineCompletion`，以兼容较新的 Copilot 语言服务器版本。新增通过 `textDocument\u002FdidPartiallyAcceptCompletion` 的部分接受遥测数据。\n- 将 `copilot-version` 重命名为 `copilot-lsp-server-version`（`copilot-version` 现已成为已废弃的别名）。\n- 使用 `compat` 替代 `f` 库依赖。\n- 将 `universal-argument`、`digit-argument`、`negative-argument` 和 `universal-argument-more` 硬编码为不应清除覆盖层的命令。\n- 对映射后的命令（如 `universal-argument-more`）也尊重 `copilot-clear-overlay-ignore-commands` 设置。\n\n### 错误修复\n\n- 重写 `copilot-balancer`，改用 `parse-partial-sexp`，以正确处理注释和字符串中的括号。（[#440](https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fissues\u002F440)）\n- 修复当服务器返回覆盖注释\u002F字符串内闭合分隔符的替换范围时，平衡器会丢弃这些闭合分隔符的问题。（[#449](https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcop","2026-02-26T08:19:36",{"id":152,"version":153,"summary_zh":154,"released_at":155},108458,"v0.3.0","## 变更内容\n* @bbatsov 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F400 中进行了小幅（主要是文档）改进\n* 功能：可自定义的 LSP 事件处理器和 LSP 服务器日志，由 @knilink 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F339 中实现\n* 允许用户指定 Copilot LSP 的 `settings`，由 @jmpunkt 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F380 中实现\n* 修复未定义函数调用问题，由 @jmpunkt 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F406 中完成\n* 修复通知处理程序中的日志消息解构问题（#407），由 @knilink 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F408 中解决\n* 修复：将已弃用的 `setEditorInfo` 替换为 `initializationOptions`，由 @ncaq 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F410 中完成\n* 还原“再次修复 #352 (#357）”，由 @bbatsov 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F412 中完成\n* 修复：缺少词法绑定标记的警告，由 @jcs090218 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F413 中解决\n* 更新与 Spacemacs 集成的步骤，由 @smile13241324 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F415 中完成\n* 接受补全时保留手动输入的尾部空格，由 @itkonen 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F414 中实现\n* 修复 copilot--get-source 中的缓冲区边界处理问题，由 @ultronozm 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F424 中完成\n* 修复：推断 LSP formattingOptions 中发送的 tabSize（#422），由 @masonkatz 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F425 中完成\n* 移除 s 库依赖，由 @midsbie 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F429 中完成\n* 修复拼写错误，由 @fpGHwd 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F428 中完成\n* 使用 track-changes 库替代手动更改跟踪，由 @ultronozm 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F431 中完成\n\n## 新贡献者\n* @knilink 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F339 中完成了首次贡献\n* @jmpunkt 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F380 中完成了首次贡献\n* @smile13241324 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F415 中完成了首次贡献\n* @itkonen 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F414 中完成了首次贡献\n* @masonkatz 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F425 中完成了首次贡献\n* @midsbie 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F429 中完成了首次贡献\n* @fpGHwd 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F428 中完成了首次贡献\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fcompare\u002Fv0.1.0...v0.3.0","2025-11-16T11:57:50",{"id":157,"version":158,"summary_zh":159,"released_at":160},108459,"v0.2.0","## 变更内容\n* @bbatsov 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F400 中进行了小幅（主要是文档）改进\n* 功能：可自定义的 LSP 事件处理器和 LSP 服务器日志，由 @knilink 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F339 中实现\n* 允许用户指定 Copilot LSP 的 `settings`，由 @jmpunkt 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F380 中实现\n* 修复未定义函数调用问题，由 @jmpunkt 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F406 中完成\n* 修复通知处理程序中的日志消息解构问题（#407），由 @knilink 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F408 中完成\n* 修复：将已弃用的 `setEditorInfo` 替换为 `initializationOptions`，由 @ncaq 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F410 中完成\n\n## 新贡献者\n* @knilink 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F339 中完成了首次贡献\n* @jmpunkt 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F380 中完成了首次贡献\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fcompare\u002Fv0.1.0...v0.2.0","2025-04-17T08:35:17",{"id":162,"version":163,"summary_zh":164,"released_at":165},108460,"v0.1.0","## 变更内容\n* ci: 自动更新 Copilot 二进制文件，由 @kiennq 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F49 中完成\n* add: 支持一个命令列表，允许在不清除 Copilot 覆盖层的情况下调用这些命令，由 @hrehfeld 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F55 中完成\n* 更新 Spacemacs 文档，由 @sid-kap 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F56 中完成\n* 在 Copilot 请求中用占位参数替换 nil 值，由 @sandersn 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F64 中完成\n* 处理带有补全的自我插入操作，由 @CeleritasCelery 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F73 中完成\n* 将 `python-ts-mode` 添加到缩进 alist 中，由 @nasyxx 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F74 中完成\n* 修复了 Spacemacs 的安装说明，由 @Martinsos 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F76 中完成\n* feat: 改进自定义类型定义，由 @Fuco1 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F82 中完成\n* feat: 提升处理大文件的速度，由 @kongds 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F84 中完成\n* 更新 README 文件，由 @chookity-pokk 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F85 中完成\n* 清理对 `point-at-bol` 和 `eol` 的使用，由 @kiennq 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F90 中完成\n* 在使用前检查 `copilot--connection` 是否处于活跃状态，由 @kiennq 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F89 中完成\n* 添加使用 Quelpa 安装的说明，由 @cedarbaum 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F96 中完成\n* 将 agent.js 更新至……版本，由 @rksm 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F88 中完成\n* 更新 readme.md 以修正 Quelpa 的安装说明，由 @redfish64 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F104 中完成\n* 添加按段落接受补全的功能，由 @debanjum 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F113 中完成\n* 默认禁用事件日志记录以提升性能，由 @blahgeek 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F125 中完成\n* 允许在使用代理时禁用 SSL 证书验证，由 @spenczar 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F130 中完成\n* 修复补全未到达行尾时的处理问题，由 @CeleritasCelery 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F132 中完成\n* 添加主要模式到语言 ID 的映射，由 @CeleritasCelery 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F131 中完成\n* 添加获取面板补全的支持，由 @rwc9u 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F135 中完成\n* 启用工作区功能，由 @haukot 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F146 中完成\n* 添加更多主要模式到语言的映射，由 @haukot 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F147 中完成\n* [RFC] 添加 copilot-balancer.el 以修复 Copilot 返回的不平衡字符对，由 @raymond-w-ko 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F157 中完成\n* 平衡器：修复当 start == end 和\u002F或 end == dquote 时出现的不平衡问题，由 @raymond-w-ko 在 https:\u002F\u002Fgithub.com\u002Fcopilot-emacs\u002Fcopilot.el\u002Fpull\u002F160 中完成\n* [修复] 修复非数字导致的缩进偏移错误","2025-04-02T07:25:11"]