Update
This commit is contained in:
25
config.el
25
config.el
@@ -1,5 +1,3 @@
|
|||||||
(setq-default tab-width 4)
|
|
||||||
|
|
||||||
(setq doom-font (font-spec :family "Maple Mono" :size 20))
|
(setq doom-font (font-spec :family "Maple Mono" :size 20))
|
||||||
(add-to-list 'default-frame-alist '(height . 53))
|
(add-to-list 'default-frame-alist '(height . 53))
|
||||||
(add-to-list 'default-frame-alist '(width . 120))
|
(add-to-list 'default-frame-alist '(width . 120))
|
||||||
@@ -17,23 +15,14 @@
|
|||||||
(add-hook 'post-command-hook #'my-yas-try-expanding-auto-snippets)
|
(add-hook 'post-command-hook #'my-yas-try-expanding-auto-snippets)
|
||||||
)
|
)
|
||||||
|
|
||||||
;; accept completion from copilot and fallback to company
|
(use-package! gptel
|
||||||
(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
|
:config
|
||||||
(add-to-list 'copilot-indentation-alist '(prog-mode 2))
|
(setq! gptel-api-key "e994f45f9b46cc8608bd2e9cd508417255514e96913b1764aab612512aa66449")
|
||||||
(add-to-list 'copilot-indentation-alist '(org-mode 2))
|
(setq gptel-model 'gemini-2.5-pro)
|
||||||
(add-to-list 'copilot-indentation-alist '(text-mode 2))
|
(setq gptel-backend (gptel-make-gh-copilot "Copilot"))
|
||||||
(add-to-list 'copilot-indentation-alist '(clojure-mode 2))
|
(map! "M-s RET" #'gptel-send)
|
||||||
(add-to-list 'copilot-indentation-alist '(emacs-lisp-mode 2)))
|
(map! "M-s m" #'gptel-menu)
|
||||||
|
)
|
||||||
|
|
||||||
(use-package! typst-ts-mode
|
(use-package! typst-ts-mode
|
||||||
:init
|
:init
|
||||||
|
|||||||
27
config.org
27
config.org
@@ -1,9 +1,4 @@
|
|||||||
* My doom config
|
* My doom config
|
||||||
** Some tweak
|
|
||||||
*** change indent size
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(setq-default tab-width 4)
|
|
||||||
#+end_src
|
|
||||||
** Appearance settings
|
** Appearance settings
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
@@ -22,7 +17,8 @@
|
|||||||
#+end_src
|
#+end_src
|
||||||
** Plugins
|
** Plugins
|
||||||
*** Yasnippet
|
*** Yasnippet
|
||||||
This enables the feature of auto-expanding snippets when matching the pattern
|
Thisenables the feature of auto-expanding snippets when matching the pattern
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package! yasnippet
|
(use-package! yasnippet
|
||||||
:config
|
:config
|
||||||
@@ -56,13 +52,13 @@ Fix the issue that backspace doesn't work on mac
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Copilot
|
*** Copilot
|
||||||
#+begin_src emacs-lisp :tangle packages.el
|
#+begin_src emacs-lisp :tangle no
|
||||||
(package! copilot
|
(package! copilot
|
||||||
:recipe (:host github :repo "copilot-emacs/copilot.el" :files ("*.el")))
|
:recipe (:host github :repo "copilot-emacs/copilot.el" :files ("*.el")))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Configuration
|
Configuration
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp :tangle no
|
||||||
;; 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)
|
||||||
@@ -82,6 +78,21 @@ Configuration
|
|||||||
(add-to-list 'copilot-indentation-alist '(emacs-lisp-mode 2)))
|
(add-to-list 'copilot-indentation-alist '(emacs-lisp-mode 2)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
*** LLM (gptel)
|
||||||
|
#+begin_src emacs-lisp :tangle packages.el
|
||||||
|
(package! gptel :recipe (:nonrecursive t))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package! gptel
|
||||||
|
:config
|
||||||
|
(setq! gptel-api-key "e994f45f9b46cc8608bd2e9cd508417255514e96913b1764aab612512aa66449")
|
||||||
|
(setq gptel-model 'gemini-2.5-pro)
|
||||||
|
(setq gptel-backend (gptel-make-gh-copilot "Copilot"))
|
||||||
|
(map! "M-s RET" #'gptel-send)
|
||||||
|
(map! "M-s m" #'gptel-menu)
|
||||||
|
)
|
||||||
|
#+end_src
|
||||||
** Lang
|
** Lang
|
||||||
*** Typst
|
*** Typst
|
||||||
**** Tree-sitter
|
**** Tree-sitter
|
||||||
|
|||||||
2
init.el
2
init.el
@@ -34,7 +34,7 @@
|
|||||||
;;doom-quit ; DOOM quit-message prompts when you quit Emacs
|
;;doom-quit ; DOOM quit-message prompts when you quit Emacs
|
||||||
(emoji +unicode) ; 🙂
|
(emoji +unicode) ; 🙂
|
||||||
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
||||||
indent-guides ; highlighted indent columns
|
;; indent-guides ; highlighted indent columns
|
||||||
ligatures ; ligatures and symbols to make your code pretty again
|
ligatures ; ligatures and symbols to make your code pretty again
|
||||||
;;minimap ; show a map of the code on the side
|
;;minimap ; show a map of the code on the side
|
||||||
modeline ; snazzy, Atom-inspired modeline, plus API
|
modeline ; snazzy, Atom-inspired modeline, plus API
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
(package! catppuccin-theme)
|
(package! catppuccin-theme)
|
||||||
|
|
||||||
(package! copilot
|
(package! gptel :recipe (:nonrecursive t))
|
||||||
:recipe (:host github :repo "copilot-emacs/copilot.el" :files ("*.el")))
|
|
||||||
|
|
||||||
(package! typst-ts-mode :recipe (:host codeberg :repo "meow_king/typst-ts-mode"))
|
(package! typst-ts-mode :recipe (:host codeberg :repo "meow_king/typst-ts-mode"))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user