Skip to content

Commit

Permalink
update something.
Browse files Browse the repository at this point in the history
  • Loading branch information
lampze committed May 16, 2024
1 parent 3ed10d4 commit 882a08d
Show file tree
Hide file tree
Showing 3 changed files with 123 additions and 32 deletions.
80 changes: 71 additions & 9 deletions config.el
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
;; 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!
(setq doom-font (font-spec :family "iosevka" :size 26)
doom-variable-pitch-font (font-spec :family "iosevka" :size 26)
(setq doom-font (font-spec :family "iosevka" :size 40)
doom-variable-pitch-font (font-spec :family "iosevka" :size 40)
;; doom-big-font (font-spec :family "iosevka" :size 30)
;; doom-symbol-font (font-spec :family "WenQuanYi Micro Hei Mono" :size 26)
;; doom-serif-font (font-spec :family "WenQuanYi Micro Hei Mono" :size 26)
Expand All @@ -49,7 +49,7 @@
;; 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-homage-white)
(setq doom-theme 'modus-operandi)

;; 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'.
Expand Down Expand Up @@ -124,8 +124,15 @@

vertico-posframe-parameters '((left-fringe . 8)
(right-fringe . 8))

org-latex-preview-numbered t

lsp-volar-take-over-mode nil
)

(let ((pos (assoc 'dvisvgm org-latex-preview-process-alist)))
(plist-put (cdr pos) :image-converter '("dvisvgm --page=1- --optimize --clipjoin --relative --no-fonts --bbox=preview -o %B-%%9p.svg %f")))


(set-email-account! "qq"
'((mu4e-sent-folder . "/qq/Sent Mail")
Expand Down Expand Up @@ -170,9 +177,59 @@
"ESC <left>" 'org-metaleft))


;; web-mode setup
(define-derived-mode vue-mode web-mode "Vue")
(add-to-list 'auto-mode-alist '("\\.vue\\'" . vue-mode))
(add-to-list 'exec-path "~/.local/bin")

(defun vue-eglot-init-options ()
(let ((tsdk-path (expand-file-name
"lib"
(string-trim-right (shell-command-to-string "npm list --global --parseable typescript | head -n1")))))
`(:typescript (:tsdk ,tsdk-path
;; :languageFeatures (:completion
;; (:defaultTagNameCase "both"
;; :defaultAttrNameCase "kebabCase"
;; :getDocumentNameCasesRequest nil
;; :getDocumentSelectionRequest nil)
;; :diagnostics
;; (:getDocumentVersionRequest nil))
;; :documentFeatures (:documentFormatting
;; (:defaultPrintWidth 100
;; :getDocumentPrintWidthRequest nil)
;; :documentSymbol t
;; :documentColor t)
)
:vue (:hybridMode :json-false)
)))

;; Volar
(set-eglot-client! 'vue-mode
`("vue-language-server" "--stdio"
:initializationOptions ,(vue-eglot-init-options)))
;; (set-eglot-client! 'vue-mode
;; `("typescript-language-server" "--stdio"
;; :initializationOptions (:plugins [(:name "@vue/typescript-plugin"
;; :location "/home/shirui/.local/lib64/node_modules/@vue/language-server"
;; :language ["vue"])]
;; :preferences (:interactiveInlayHints :json-false)
;; :tsserver (:logVerbosity "verbose"
;; :trace "verbose"))))


(use-package! guess-word)


;; (use-package sqlite-mode-extras
;; :bind (:map
;; sqlite-mode-map
;; ("n" . next-line)
;; ("p" . previous-line)
;; ("<backtab>" . sqlite-mode-extras-backtab-dwim)
;; ("<tab>" . sqlite-mode-extras-tab-dwim)
;; ("RET" . sqlite-mode-extras-ret-dwim)))


(use-package! zotxt
:hook (org-mode . org-zotxt-mode))

Expand Down Expand Up @@ -223,6 +280,11 @@

(add-hook! 'python-mode-hook #'lampze/pdm-activate)

(use-package! go-translate
:config
(setq gt-langs '(en zh)
gt-default-translator (gt-translator :engines (gt-youdao-dict-engine))))


(use-package! holo-layer
:config
Expand All @@ -245,11 +307,11 @@
;; lsp-pyright-venv-path nil)))))


(use-package! org-fragtog
:defer t
:hook (org-mode . org-fragtog-mode)
:config
(plist-put org-format-latex-options :scale 3.0))
;; (use-package! org-fragtog
;; :defer t
;; :hook (org-mode . org-fragtog-mode)
;; :config
;; (plist-put org-format-latex-options :scale 3.0))


(use-package! rime
Expand Down Expand Up @@ -413,7 +475,7 @@


(set-company-backend! 'org-mode
'(:separate company-math-symbols-latex company-latex-commands))
'(:separate company-math-symbols-latex company-latex-commands))

(defun daviwil/org-roam-filter-by-tag (tag-name)
(lambda (node)
Expand Down
14 changes: 7 additions & 7 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@
;;layout ; auie,ctsrnm is the superior home row

:completion
(company +childframe) ; the ultimate code completion backend
;;company ; the ultimate code completion backend
(corfu +orderless +icons +dabbrev) ; complete with cap(f), cape and a flying feather!
;;helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine...
;; ivy ; a search engine for love and life
(vertico +icons +childframe) ; the search engine of the future
(vertico +icons) ; the search engine of the future

:ui
;;deft ; notational velocity for Emacs
Expand Down Expand Up @@ -67,7 +68,7 @@
word-wrap ; soft wrapping with language-aware indent

:emacs
dired ; making dired pretty [functional]
(dired +icons) ; making dired pretty [functional]
electric ; smarter, keyword-based electric-indent
ibuffer ; interactive buffer management
undo ; persistent, smarter undo for your inevitable mistakes
Expand All @@ -94,9 +95,8 @@
;;editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls)
;;gist ; interacting with github gists
lookup ; navigate your code and its documentation
(lsp +peek)
(lsp +eglot)
magit ; a git porcelain for Emacs
make ; run make tasks from Emacs
;;pass ; password manager for nerds
Expand Down Expand Up @@ -142,7 +142,7 @@
;;hy ; readability of scheme w/ speed of python
;;idris ;
(json +tree-sitter) ; At least it ain't XML
(java +meghanada +lsp +tree-sitter) ; the poster child for carpal tunnel syndrome
(java +lsp +tree-sitter) ; the poster child for carpal tunnel syndrome
(javascript +lsp +tree-sitter) ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
Expand All @@ -167,7 +167,7 @@
;;php ; perl's insecure younger brother
plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
(python +lsp +tree-sitter +pyright) ; beautiful is better than ugly
(python +lsp +tree-sitter) ; beautiful is better than ugly
qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6
Expand Down
61 changes: 45 additions & 16 deletions packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,47 @@


;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
;(package! some-package)
;(package! some-package)

;; To install a package directly from a remote git repo, you must specify a
;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
;; https://github.com/raxod502/straight.el#the-recipe-format
;(package! another-package
; :recipe (:host github :repo "username/repo"))
;; https://github.com/radian-software/straight.el#the-recipe-format
;(package! another-package
; :recipe (:host github :repo "username/repo"))

;; If the package you are trying to install does not contain a PACKAGENAME.el
;; file, or is located in a subdirectory of the repo, you'll need to specify
;; `:files' in the `:recipe':
;(package! this-package
; :recipe (:host github :repo "username/repo"
; :files ("some-file.el" "src/lisp/*.el")))
;(package! this-package
; :recipe (:host github :repo "username/repo"
; :files ("some-file.el" "src/lisp/*.el")))

;; If you'd like to disable a package included with Doom, you can do so here
;; with the `:disable' property:
;(package! builtin-package :disable t)
;(package! builtin-package :disable t)

;; You can override the recipe of a built in package without having to specify
;; all the properties for `:recipe'. These will inherit the rest of its recipe
;; from Doom or MELPA/ELPA/Emacsmirror:
;(package! builtin-package :recipe (:nonrecursive t))
;(package! builtin-package-2 :recipe (:repo "myfork/package"))
;(package! builtin-package :recipe (:nonrecursive t))
;(package! builtin-package-2 :recipe (:repo "myfork/package"))

;; Specify a `:branch' to install a package from a particular branch or tag.
;; This is required for some packages whose default branch isn't 'master' (which
;; our package manager can't deal with; see raxod502/straight.el#279)
;(package! builtin-package :recipe (:branch "develop"))
;; our package manager can't deal with; see radian-software/straight.el#279)
;(package! builtin-package :recipe (:branch "develop"))

;; Use `:pin' to specify a particular commit to install.
;(package! builtin-package :pin "1a2b3c4d5e")
;(package! builtin-package :pin "1a2b3c4d5e")


;; Doom's packages are pinned to a specific commit and updated from release to
;; release. The `unpin!' macro allows you to unpin single packages...
;(unpin! pinned-package)
;(unpin! pinned-package)
;; ...or multiple packages
;(unpin! pinned-package another-pinned-package)
;(unpin! pinned-package another-pinned-package)
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;(unpin! t)
;(unpin! t)

(package! paredit)
(package! multiple-cursors)
Expand All @@ -60,6 +60,7 @@
(package! org-fragtog)
(package! xmind-org)
(package! zotxt)
(package! go-translate)

(package! elfeed-goodies :disable t)

Expand All @@ -77,3 +78,31 @@
(package! holo-layer :recipe (:host github
:repo "manateelazycat/holo-layer"
:files ("*")))
(unpin! org)
(package! org :recipe
(:host nil :repo "https://git.tecosaur.net/mirrors/org-mode.git" :remote "mirror" :fork
(:host nil :repo "https://git.tecosaur.net/tec/org-mode.git" :branch "dev" :remote "tecosaur")
:files
(:defaults "etc")
:build t :pre-build
(with-temp-file "org-version.el"
(require 'lisp-mnt)
(let
((version
(with-temp-buffer
(insert-file-contents "lisp/org.el")
(lm-header "version")))
(git-version
(string-trim
(with-temp-buffer
(call-process "git" nil t nil "rev-parse" "--short" "HEAD")
(buffer-string)))))
(insert
(format "(defun org-release () \"The release version of Org.\" %S)\n" version)
(format "(defun org-git-version () \"The truncate git commit hash of Org mode.\" %S)\n" git-version)
"(provide 'org-version)\n"))))
:pin nil)

;; (package! sqlite-mode-extras :recipe (:host github
;; :repo "xenodium/dotsies"
;; :files ("emacs/ar/sqlite-mode-extras.el")))

0 comments on commit 882a08d

Please sign in to comment.