From c8c650ee5fbf67e6456a2a9d9a1be73c455f59a3 Mon Sep 17 00:00:00 2001 From: Zelong Kuang Date: Fri, 21 Nov 2025 01:05:13 +1100 Subject: [PATCH] Update --- config.el | 6 ---- config.org | 61 +++------------------------------- init.el | 12 +++---- packages.el | 2 ++ snippets/org-mode/source block | 2 +- 5 files changed, 13 insertions(+), 70 deletions(-) diff --git a/config.el b/config.el index ba3f396..e85d24c 100644 --- a/config.el +++ b/config.el @@ -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) diff --git a/config.org b/config.org index 60687b4..1c129bb 100644 --- a/config.org +++ b/config.org @@ -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 "") (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 - ("" . 'copilot-accept-completion) - ("TAB" . 'copilot-accept-completion) - ("C-TAB" . 'copilot-accept-completion-by-word) - ("C-" . '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 diff --git a/init.el b/init.el index d99f1b5..7a52fdc 100644 --- a/init.el +++ b/init.el @@ -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 @@ -159,16 +159,16 @@ ( org +pretty +roam +dragndrop +pandoc +gnuplot) ; organize your plain life in plain text ;;php ; perl's insecure younger brother ;;plantuml ; diagrams for confusing people more - ;; graphviz ; diagrams for confusing yourself even 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 diff --git a/packages.el b/packages.el index 51883d7..2c8a3fc 100644 --- a/packages.el +++ b/packages.el @@ -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 diff --git a/snippets/org-mode/source block b/snippets/org-mode/source block index 4c3c1e2..305ef8a 100644 --- a/snippets/org-mode/source block +++ b/snippets/org-mode/source block @@ -1,6 +1,6 @@ # -*- mode: snippet -*- # name: source block -# key: