Skip to content

Commit

Permalink
feat: init.el
Browse files Browse the repository at this point in the history
  • Loading branch information
yqrashawn committed Feb 20, 2025
1 parent a793ded commit 3969e96
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 65 deletions.
24 changes: 12 additions & 12 deletions .doom.d/init.el
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ See the docstrings of `defalias' and `make-obsolete' for more details."
;;layout ; auie,ctsrnm is the superior home row

:completion
(corfu +orderless +icons +dabbrev +dict)
(corfu +orderless +icons +dabbrev)
;; (company +childframe) ; the ultimate code completion backend
;;helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine...
;; (ivy +fuzzy) ; a search engine for love and life
vertico ; the search engine of the future
(vertico +childframe) ; the search engine of the future

:ui
;;deft ; notational velocity for Emacs
Expand All @@ -156,7 +156,7 @@ See the docstrings of `defalias' and `make-obsolete' for more details."
;;unicode ; extended unicode support for various languages
(vc-gutter +pretty); vcs diff in the fringe
vi-tilde-fringe ; fringe tildes to mark beyond EOB
window-select ; visually switch windows
;; window-select ; visually switch windows
workspaces ; tab emulation, persistence & separate workspaces
zen ; distraction-free coding or writing

Expand Down Expand Up @@ -198,7 +198,7 @@ See the docstrings of `defalias' and `make-obsolete' for more details."
;;biblio ; Writes a PhD for you (citation needed)
;;debugger ; FIXME stepping through code, to help you add bugs
direnv
docker
(docker +lsp)
editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls)
Expand All @@ -213,13 +213,13 @@ See the docstrings of `defalias' and `make-obsolete' for more details."
;; rgb ; creating color strings
;; taskrunner ; taskrunner for all your projects
;; terraform ; infrastructure as code
tmux ; an API for interacting with tmux
;; tree-sitter
;; tmux ; an API for interacting with tmux
tree-sitter
;;upload ; map local to remote projects via ssh/ftp

:os
(:if IS-MAC macos) ; improve compatibility with macOS
tty ; improve the terminal Emacs experience
(tty +osc) ; improve the terminal Emacs experience

:lang
;;agda ; types of types of types of types...
Expand Down Expand Up @@ -257,18 +257,18 @@ See the docstrings of `defalias' and `make-obsolete' for more details."
;;latex ; writing papers in Emacs has never been so fun
;;lean ; for folks with too much to prove
;;ledger ; be audit you can be
(lua +fennel +lsp) ; one-based indices? one-based indices
(lua +fennel +lsp +tree-sitter) ; one-based indices? one-based indices
(markdown +grip) ; writing docs for people to ignore
nim ; python + lisp at the speed of c
(nix +tree-sitter) ; I hereby declare "nix geht mehr!"
;; nim ; python + lisp at the speed of c
(nix +lsp +tree-sitter) ; I hereby declare "nix geht mehr!"
;;(ocaml +tree-sitter) ; an objective camel
(org +dragndrop +journal +pandoc +pretty +roam2) ; organize your plain life in plain text
;;php ; perl's insecure younger brother
plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
(python +pyenv +tree-sitter +lsp) ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
(racket +lsp +xp +hash-lang) ; a DSL for DSLs
;;raku ; the artist formerly known as perl6
(rest +jq) ; Emacs as a REST client
;;rst ; ReST in peace
Expand Down Expand Up @@ -300,7 +300,7 @@ See the docstrings of `defalias' and `make-obsolete' for more details."

:config
;;literate
(default +bindings +smartparens))
(default +bindings +smartparens +gnupg))

;; https://discourse.doomemacs.org/t/using-lsp-use-plists-with-doom/2832
(setenv "LSP_USE_PLISTS" "true")
Expand Down
15 changes: 10 additions & 5 deletions .doom.d/map.el
Original file line number Diff line number Diff line change
Expand Up @@ -482,10 +482,10 @@
:n "}" (cmd! (lispyville-insert-at-end-of-list 1) (insert ""))
:ni "M-RET" #'lispyville-wrap-round
:i "C-r" #'lispy-right
:i "C-i" #'lispy-parens-down)
:v "(" #'lispyville-wrap-round
:v "{" #'lispyville-wrap-braces
:v "[" #'lispyville-wrap-brackets)
:i "C-i" #'lispy-parens-down
:v "(" #'lispyville-wrap-round
:v "{" #'lispyville-wrap-braces
:v "[" #'lispyville-wrap-brackets))
;; (:after symex
;; (:map symex-editing-mode-map
;; :o "j" #'symex-go-forward
Expand Down Expand Up @@ -782,4 +782,9 @@
:g "x" #'verb-show-vars))
(:after org
(:map org-mode-map
:g "C-c r" verb-command-map)))
:g "C-c r" verb-command-map))
(:after leetcode
(:map leetcode-solution-mode-map
:g "C-4" #'leetcode-try
:g "C-5" #'leetcode-restore-layout
:g "C-7" #'leetcode-submit)))
2 changes: 2 additions & 0 deletions .doom.d/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@
(package! verb)
(package! buffer-terminator)
(package! ejc-sql)
(package! leetcode)
(package! minuet :recipe (:host github :repo "milanglacier/minuet-ai.el"))

;; Local Variables:
;; eval: (apheleia-mode -1)
Expand Down
33 changes: 32 additions & 1 deletion .doom.d/prog.el
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ It is a fallback for when which-func-functions and `add-log-current-defun' retur
:init
(setq! copilot-max-char -1
copilot-idle-delay 10
;; copilot-version "1.41.0"
copilot-indent-offset-warning-disable t)
:config
(pushnew! copilot-indentation-alist
Expand Down Expand Up @@ -323,3 +322,35 @@ Each file is opened (if not already) with `find-file-noselect` relative to the c
:defer t
:init
(set-popup-rule! "^\\*HTTP Response.*" :side 'right :size 0.4 :vslot 97 :quit t))

(use-package! leetcode
:defer t
:init
(setq! leetcode-prefer-language "javascript"
leetcode-save-solutions t))

(defvar minuet-openai-compatible-options
`(:end-point ,(concat +openrouter-url "/chat/completions")
:api-key ,(cl-constantly +openrouter-api-key)
;; :model "qwen/qwen-2.5-coder-32b-instruct"
:model "google/gemini-2.0-flash-001"
:system
(:template minuet-default-system-template
:prompt minuet-default-prompt
:guidelines minuet-default-guidelines
:n-completions-template minuet-default-n-completion-template)
:fewshots minuet-default-fewshots
:chat-input
(:template minuet-default-chat-input-template
:language-and-tab minuet--default-chat-input-language-and-tab-function
:context-before-cursor minuet--default-chat-input-before-cursor-function
:context-after-cursor minuet--default-chat-input-after-cursor-function)
:optional nil)
"Config options for Minuet OpenAI compatible provider.")

(use-package! minuet
:defer t
:init
(setq! minuet-context-window 512)
:config
(setq! minuet-provider 'openai-compatible))
90 changes: 45 additions & 45 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3969e96

Please sign in to comment.