UP | HOME

Emacs에 Copilot 설정하기

Table of Contents

Aider 써보고 싶긴 한데 Copilot 결제해놓은 게 있어서 우선 이걸 쓰자.

GitHub - copilot-emacs/copilot.el: An unofficial Copilot plugin for Emacs.

1. Doom Emacs

1.1. copilot.el 의존성 추가

(package! copilot
  :recipe (:host github :repo "copilot-emacs/copilot.el" :files ("*.el")))

1.2. 설정 추가

(use-package! copilot
:hook (prog-mode . copilot-mode)
:bind (:map copilot-completion-map
        ("<tab>" . 'copilot-accept-completion)
        ("TAB" . 'copilot-accept-completion)
        ("C-TAB" . 'copilot-accept-completion-by-word)
        ("C-<tab>" . 'copilot-accept-completion-by-word)))

1.3. 실행

  1. M-x copilot-install-server로 서버 설치
  2. M-x copilot-login으로 Copilot 로그인

Author: 안녕

Created: 2024-12-10 Tue 22:08