This commit is contained in:
Zelong Kuang
2025-11-16 20:42:35 +11:00
parent ee4f3efd79
commit 7d10eb4cbb
6 changed files with 6 additions and 130 deletions

View File

@@ -12,11 +12,6 @@
(yas-expand)))) (yas-expand))))
(add-hook 'post-command-hook #'my-yas-try-expanding-auto-snippets)) (add-hook 'post-command-hook #'my-yas-try-expanding-auto-snippets))
(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"))))
;; accept completion from copilot and fallback to company ;; accept completion from copilot and fallback to company
(use-package! copilot (use-package! copilot
:hook (prog-mode . copilot-mode) :hook (prog-mode . copilot-mode)

View File

@@ -21,8 +21,8 @@ This enables the feature of auto-expanding snippets when matching the pattern
(add-hook 'post-command-hook #'my-yas-try-expanding-auto-snippets)) (add-hook 'post-command-hook #'my-yas-try-expanding-auto-snippets))
#+end_src #+end_src
*** Eat *** Eat (deprecated)
#+begin_src emacs-lisp :tangle packages.el #+begin_src emacs-lisp :tangle no
(package! eat (package! eat
:recipe (:type git :recipe (:type git
:host codeberg :host codeberg
@@ -35,7 +35,7 @@ This enables the feature of auto-expanding snippets when matching the pattern
#+end_src #+end_src
Fix the issue that backspace doesn't work on mac Fix the issue that backspace doesn't work on mac
#+begin_src emacs-lisp #+begin_src emacs-lisp :tangle no
(after! eat (after! eat
(when (eq system-type 'darwin) (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 "C-h") #'eat-self-input)

View File

@@ -1,93 +0,0 @@
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
;; Place your private configuration here! Remember, you do not need to run 'doom
;; sync' after modifying this file!
;; Some functionality uses this to identify you, e.g. GPG configuration, email
;; clients, file templates and snippets. It is optional.
;; (setq user-full-name "John Doe"
;; user-mail-address "john@doe.com")
;; Doom exposes five (optional) variables for controlling fonts in Doom:
;;
;; - `doom-font' -- the primary font to use
;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable)
;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for
;; presentations or streaming.
;; - `doom-symbol-font' -- for symbols
;; - `doom-serif-font' -- for the `fixed-pitch-serif' face
;;
;; See 'C-h v doom-font' for documentation and more examples of what they
;; accept. For example:
;;
(setq doom-font (font-spec :family "Maple Mono" :size 20))
(add-to-list 'default-frame-alist '(height . 53))
(add-to-list 'default-frame-alist '(width . 120))
;;(setq doom-font (font-spec :family "Fira Code" :size 12 :weight 'semi-light)
;; doom-variable-pitch-font (font-spec :family "Fira Sans" :size 13))
;;
;; If you or Emacs can't find your font, use 'M-x describe-font' to look them
;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
;; refresh your font settings. If Emacs still can't find your font, it likely
;; wasn't installed correctly. Font issues are rarely Doom issues!
;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the
;; `load-theme' function. This is the default:
(setq doom-theme 'doom-one)
;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
(setq display-line-numbers-type t)
;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
(setq org-directory "~/org/")
;; Whenever you reconfigure a package, make sure to wrap your config in an
;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
;;
;; (after! PACKAGE
;; (setq x y))
;;
;; The exceptions to this rule:
;;
;; - Setting file/directory variables (like `org-directory')
;; - Setting variables which explicitly tell you to set them before their
;; package is loaded (see 'C-h v VARIABLE' to look up their documentation).
;; - Setting doom variables (which start with 'doom-' or '+').
;;
;; Here are some additional functions/macros that will help you configure Doom.
;;
;; - `load!' for loading external *.el files relative to this one
;; - `use-package!' for configuring packages
;; - `after!' for running code after a package has loaded
;; - `add-load-path!' for adding directories to the `load-path', relative to
;; this file. Emacs searches the `load-path' when you load packages with
;; `require' or `use-package'.
;; - `map!' for binding new keys
;;
;; To get information about any of these functions/macros, move the cursor over
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
;; This will open documentation for it, including demos of how they are used.
;; Alternatively, use `C-h o' to look up a symbol (functions, variables, faces,
;; etc).
;;
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
;; they are implemented.
(after! yasnippet
(defun my-yas-try-expanding-auto-snippets ()
(when yas-minor-mode
(let ((yas-buffer-local-condition ''(require-snippet-condition . auto)))
(yas-expand))))
(add-hook 'post-command-hook #'my-yas-try-expanding-auto-snippets))
(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"))))

View File

@@ -1,16 +0,0 @@
;;; -*- lexical-binding: t -*-
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(custom-safe-themes
'("7c3d62a64bafb2cc95cd2de70f7e4446de85e40098ad314ba2291fc07501b70c"
"0325a6b5eea7e5febae709dab35ec8648908af12cf2d2b569bedc8da0a3a81c1"
"3f24dd8f542f4aa8186a41d5770eb383f446d7228cd7a3413b9f5e0ec0d5f3c0" default)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)

View File

@@ -42,7 +42,7 @@
;;neotree ; a project drawer, like NERDTree for vim ;;neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows (popup +defaults) ; tame sudden yet inevitable temporary windows
;;smooth-scroll ; So smooth you won't believe it's not butter smooth-scroll ; So smooth you won't believe it's not butter
tabs ; a tab bar for Emacs tabs ; a tab bar for Emacs
treemacs ; a project drawer, like neotree but cooler treemacs ; a project drawer, like neotree but cooler
unicode ; extended unicode support for various languages unicode ; extended unicode support for various languages
@@ -80,7 +80,7 @@
eshell ; the elisp shell that works everywhere eshell ; the elisp shell that works everywhere
;;shell ; simple shell REPL for Emacs ;;shell ; simple shell REPL for Emacs
;; term ; basic terminal emulator for Emacs ;; term ; basic terminal emulator for Emacs
;; vterm ; the best terminal emulation in Emacs vterm ; the best terminal emulation in Emacs
:checkers :checkers
syntax ; tasing you for every semicolon you forget syntax ; tasing you for every semicolon you forget
@@ -103,7 +103,7 @@
magit ; a git porcelain for Emacs magit ; a git porcelain for Emacs
make ; run make tasks from Emacs make ; run make tasks from Emacs
;;pass ; password manager for nerds ;;pass ; password manager for nerds
;; pdf ; pdf enhancements pdf ; pdf enhancements
;;terraform ; infrastructure as code ;;terraform ; infrastructure as code
tmux ; an API for interacting with tmux tmux ; an API for interacting with tmux
tree-sitter ; syntax and parsing, sitting in a tree... tree-sitter ; syntax and parsing, sitting in a tree...

View File

@@ -1,13 +1,3 @@
(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"))))
(package! copilot (package! copilot
:recipe (:host github :repo "copilot-emacs/copilot.el" :files ("*.el"))) :recipe (:host github :repo "copilot-emacs/copilot.el" :files ("*.el")))