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

@@ -65,12 +65,6 @@
(add-hook 'post-command-hook #'my-yas-try-expanding-auto-snippets)
)
(use-package! gptel
:config
(setq gptel-model 'claude-sonnet-4.5)
(setq gptel-backend (gptel-make-gh-copilot "Copilot"))
)
(use-package! rainbow-delimiters
:hook ((prog-mode . rainbow-delimiters-mode)
(typst-ts-mode . rainbow-delimiters-mode)

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

10
init.el
View File

@@ -35,7 +35,7 @@
;; (emoji +unicode) ; 🙂
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;; indent-guides ; highlighted indent columns
ligatures ; ligatures and symbols to make your code pretty again
( ligatures +extras) ; ligatures and symbols to make your code pretty again
;;minimap ; show a map of the code on the side
;; modeline ; snazzy, Atom-inspired modeline, plus API
;;nav-flash ; blink cursor line after big motions
@@ -50,7 +50,7 @@
vi-tilde-fringe ; fringe tildes to mark beyond EOB
;;window-select ; visually switch windows
workspaces ; tab emulation, persistence & separate workspaces
;;zen ; distraction-free coding or writing
( zen +mixed-pitch-mode) ; distraction-free coding or writing
:editor
(evil +everywhere); come to the dark side, we have cookies
@@ -139,7 +139,7 @@
;;gdscript ; the language you waited for
;;(go +lsp) ; the hipster dialect
;;(graphql +lsp) ; Give queries a REST
;;(haskell +lsp) ; a language that's lazier than I am
(haskell +lsp +tree-sitter) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
;;idris ; a language you can depend on
( json +lsp +tree-sitter) ; At least it ain't XML
@@ -161,14 +161,14 @@
;;plantuml ; diagrams for confusing people more
;;graphviz ; diagrams for confusing yourself even more
;;purescript ; javascript, but functional
python ; beautiful is better than ugly
( python +lsp +pyright +tree-sitter +poetry) ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6
;;rest ; Emacs as a REST client
;;rst ; ReST in peace
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
;;(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
(rust +lsp +tree-sitter) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good
;;(scheme +guile) ; a fully conniving family of lisps
sh ; she sells {ba,z,fi}sh shells on the C xor

View File

@@ -8,6 +8,8 @@
(package! rainbow-delimiters)
(package! leetcode)
(package! typst-ts-mode :recipe (:host codeberg :repo "meow_king/typst-ts-mode"))
(package! typst-preview

View File

@@ -1,6 +1,6 @@
# -*- mode: snippet -*-
# name: source block
# key: <source
# key: <src
# --
#+begin_src ${1:$$(yas-auto-next (yas-completing-read "Language: " (mapcar 'car org-babel-load-languages))) }
$0