Open tiny911 opened 1 month ago
You want something like this:
(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)
("C-n" . 'copilot-next-completion)
("C-p" . 'copilot-previous-completion))
:config
(add-to-list 'copilot-indentation-alist '(prog-mode . 2))
(add-to-list 'copilot-indentation-alist '(org-mode . 2))
(add-to-list 'copilot-indentation-alist '(text-mode . 2))
(add-to-list 'copilot-indentation-alist '(closure-mode . 2))
(add-to-list 'copilot-indentation-alist '(emacs-lisp-mode . 2)))
Just tune your indentation settings so they are not 2 spaces. I wish copilot could use tab-width
by default if it cannot found mode specific indentation offset.
This warning is always reported in go-mode recently. How to set the indentation-offset or ignore the warning? I'm using doom emacs