This commit is contained in:
Zelong Kuang
2025-11-21 01:05:13 +11:00
parent b431e63bd3
commit c8c650ee5f
5 changed files with 13 additions and 70 deletions

View File

@@ -96,63 +96,6 @@ Thisenables the feature of auto-expanding snippets when matching the pattern
)
#+end_src
*** Eat (deprecated)
#+begin_src emacs-lisp :tangle no
(package! eat
:recipe (:type git
:host codeberg
:repo "akib/emacs-eat"
:files ("*.el" ("term" "term/*.el") "*.texi"
"*.ti" ("terminfo/e" "terminfo/e/*")
("terminfo/65" "terminfo/65/*")
("integration" "integration/*")
(:exclude ".dir-locals.el" "*-tests.el"))))
#+end_src
Fix the issue that backspace doesn't work on mac
#+begin_src emacs-lisp :tangle no
(after! eat
(when (eq system-type 'darwin)
(define-key eat-semi-char-mode-map (kbd "C-h") #'eat-self-input)
(define-key eat-semi-char-mode-map (kbd "<backspace>") (kbd "C-h"))))
#+end_src
*** Copilot
#+begin_src emacs-lisp :tangle no
(package! copilot
:recipe (:host github :repo "copilot-emacs/copilot.el" :files ("*.el")))
#+end_src
Configuration
#+begin_src emacs-lisp :tangle no
;; accept completion from copilot and fallback to company
(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 '(clojure-mode 2))
(add-to-list 'copilot-indentation-alist '(emacs-lisp-mode 2)))
#+end_src
*** LLM (gptel)
#+begin_src emacs-lisp
(use-package! gptel
:config
(setq gptel-model 'claude-sonnet-4.5)
(setq gptel-backend (gptel-make-gh-copilot "Copilot"))
)
#+end_src
*** Rainbow delimiters
#+begin_src emacs-lisp :tangle packages.el
(package! rainbow-delimiters)
@@ -163,6 +106,10 @@ Configuration
(typst-ts-mode . rainbow-delimiters-mode)
(foo-mode . rainbow-delimiters-mode)))
#+end_src
*** Leetcode
#+begin_src emacs-lisp :tangle packages.el
(package! leetcode)
#+end_src
** Lang
*** Typst
**** Tree-sitter