update
This commit is contained in:
parent
3ce352d3cc
commit
7d4c2c2395
3 changed files with 117 additions and 81 deletions
167
config.el
167
config.el
|
@ -67,12 +67,13 @@
|
|||
;; 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-dracula)
|
||||
(setq doom-theme 'doom-badger)
|
||||
(cnfonts-mode 1)
|
||||
(beacon-mode 1)
|
||||
(setq word-wrap-by-category t)
|
||||
|
||||
(load! "secrets")
|
||||
(setq-default custom-file (expand-file-name "secrets.el" doom-private-dir))
|
||||
(setq-default custom-file (expand-file-name "secrets.el" doom-user-dir))
|
||||
(when (file-exists-p custom-file)
|
||||
(load custom-file))
|
||||
|
||||
|
@ -81,6 +82,16 @@
|
|||
(add-hook hook function))
|
||||
hooks))
|
||||
|
||||
;;clippy
|
||||
(map! :leader
|
||||
(:prefix ("c h" . "Help info from Clippy")
|
||||
:desc "Clippy describes function under point" "f" #'clippy-describe-function
|
||||
:desc "Clippy describes variable under point" "v" #'clippy-describe-variable))
|
||||
|
||||
;;shell
|
||||
(setq shell-file-name "/bin/zsh"
|
||||
vterm-max-scrollback 5000)
|
||||
|
||||
;;font
|
||||
(add-to-list 'default-frame-alist '(height . 35))
|
||||
(add-to-list 'default-frame-alist '(width . 102))
|
||||
|
@ -129,7 +140,40 @@
|
|||
;; numbers are disabled. For relative line numbers, set this to `relative'.
|
||||
(setq display-line-numbers-type t)
|
||||
|
||||
;;mode
|
||||
;; debuger
|
||||
(after! dap-mode
|
||||
(setq dap-python-debugger 'debugpy))
|
||||
|
||||
(map! :map dap-mode-map
|
||||
:leader
|
||||
:prefix ("d" . "dap")
|
||||
;; basics
|
||||
:desc "dap next" "n" #'dap-next
|
||||
:desc "dap step in" "i" #'dap-step-in
|
||||
:desc "dap step out" "o" #'dap-step-out
|
||||
:desc "dap continue" "c" #'dap-continue
|
||||
:desc "dap hydra" "h" #'dap-hydra
|
||||
:desc "dap debug restart" "r" #'dap-debug-restart
|
||||
:desc "dap debug" "s" #'dap-debug
|
||||
|
||||
;; debug
|
||||
:prefix ("dd" . "Debug")
|
||||
:desc "dap debug recent" "r" #'dap-debug-recent
|
||||
:desc "dap debug last" "l" #'dap-debug-last
|
||||
|
||||
;; eval
|
||||
:prefix ("de" . "Eval")
|
||||
:desc "eval" "e" #'dap-eval
|
||||
:desc "eval region" "r" #'dap-eval-region
|
||||
:desc "eval thing at point" "s" #'dap-eval-thing-at-point
|
||||
:desc "add expression" "a" #'dap-ui-expressions-add
|
||||
:desc "remove expression" "d" #'dap-ui-expressions-remove
|
||||
|
||||
:prefix ("db" . "Breakpoint")
|
||||
:desc "dap breakpoint toggle" "b" #'dap-breakpoint-toggle
|
||||
:desc "dap breakpoint condition" "c" #'dap-breakpoint-condition
|
||||
:desc "dap breakpoint hit count" "h" #'dap-breakpoint-hit-condition
|
||||
:desc "dap breakpoint log message" "l" #'dap-breakpoint-log-message)
|
||||
|
||||
;; mail
|
||||
(set-email-account! "southfox.me"
|
||||
|
@ -141,12 +185,6 @@
|
|||
(mu4e-compose-signature . "---\nFor mu4e"))
|
||||
t)
|
||||
|
||||
(setq sendmail-program "/usr/bin/msmtp"
|
||||
send-mail-function #'smtpmail-send-it
|
||||
message-sendmail-f-is-evil t
|
||||
message-sendmail-extra-arguments '("--read-envelope-from")
|
||||
message-send-mail-function #'message-send-mail-with-sendmail)
|
||||
|
||||
;; guess-word
|
||||
(use-package! guess-word)
|
||||
(setq guess-word-org-file (f-expand "~/Nextcloud/Documents/my-esl.org"))
|
||||
|
@ -165,7 +203,7 @@
|
|||
"KDic11万英汉词典"
|
||||
))
|
||||
|
||||
(map! :leader :desc "sdvc" "d" #'sdcv-search-pointer+)
|
||||
(map! :leader :desc "sdvc" "z" #'sdcv-search-pointer+)
|
||||
;; rime
|
||||
(use-package! rime
|
||||
:custom
|
||||
|
@ -249,65 +287,25 @@
|
|||
;;; org
|
||||
;; 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!
|
||||
;; (defun org-summary-todo (n-done n-not-done)
|
||||
;; "Switch entry to DONE when all subentries are done, to TODO otherwise."
|
||||
;; (let (org-log-done org-log-states) ; turn off logging
|
||||
;; (org-todo (if (= n-not-done 0) "DONE" "TODO"))))
|
||||
|
||||
;; (add-hook 'org-after-todo-statistics-hook 'org-summary-todo)
|
||||
(after! org
|
||||
(setq org-directory "~/org/")
|
||||
(setq org-image-actual-width '(400))
|
||||
(setq org-link-search-must-match-exact-headline nil)
|
||||
(setq org-log-done 'time)
|
||||
(setq org-log-into-drawer t))
|
||||
(setq org-directory "~/org/"
|
||||
org-ellipsis " ▼ "
|
||||
org-superstar-headline-bullets-list '("◉" "●" "○" "◆" "●" "○" "◆")
|
||||
org-image-actual-width '(400)
|
||||
org-link-search-must-match-exact-headline nil
|
||||
org-log-done 'time
|
||||
org-log-into-drawer t))
|
||||
|
||||
;(setq org-emphasis-regexp-components '("-[:multibyte:][:space:]('\"{" "-[:multibyte:][:space:].,:!?;'\")}\\[" "[:space:]" "." 1))
|
||||
;(org-set-emph-re 'org-emphasis-regexp-components org-emphasis-regexp-components)
|
||||
;(org-element-update-syntax)
|
||||
|
||||
;; super agenda
|
||||
(use-package! org-super-agenda
|
||||
:commands org-super-agenda-mode)
|
||||
|
||||
;; (after! org-agenda
|
||||
;; (org-super-agenda-mode))
|
||||
|
||||
;; (setq org-agenda-skip-scheduled-if-done t
|
||||
;; org-agenda-skip-deadline-if-done t
|
||||
;; org-agenda-include-deadlines t
|
||||
;; org-agenda-block-separator nil
|
||||
;; org-agenda-tags-column 100 ;; from testing this seems to be a good value
|
||||
;; org-agenda-compact-blocks t)
|
||||
|
||||
;; (setq org-agenda-custom-commands
|
||||
;; '(("o" "Overview"
|
||||
;; ((agenda "" ((org-agenda-span 'day)
|
||||
;; (org-agenda-start-day nil)
|
||||
;; (org-super-agenda-groups
|
||||
;; '((:name "降"
|
||||
;; :time-grid t
|
||||
;; :date today
|
||||
;; :scheduled today
|
||||
;; :order 1)))))
|
||||
;; (alltodo "" ((org-agenda-overriding-header "")
|
||||
;; (org-super-agenda-groups
|
||||
;; '((:name "继"
|
||||
;; :todo "STRT"
|
||||
;; :order 1)
|
||||
;; (:name "急"
|
||||
;; :tag "急"
|
||||
;; :priority "A"
|
||||
;; :order 6)
|
||||
;; (:name "绷"
|
||||
;; :deadline today
|
||||
;; :order 2)
|
||||
;; (:name "临"
|
||||
;; :deadline future
|
||||
;; :order 8)
|
||||
;; (:name "逝"
|
||||
;; :deadline past
|
||||
;; :face error
|
||||
;; :order 7)
|
||||
;; (:name "待"
|
||||
;; :scheduled today
|
||||
;; :order 3)
|
||||
;; (:discard (:tag ("Chore" "Routine" "Daily")))))))))))
|
||||
|
||||
;; elfeed
|
||||
(after! elfeed
|
||||
(setq elfeed-search-filter "@6-month-ago +unread")
|
||||
|
@ -335,32 +333,67 @@
|
|||
("T" "Tickler" entry
|
||||
(file+headline "~/Nextcloud/gtd/tickler.org" "Tickler")
|
||||
"* %i%? \n %U"))))
|
||||
;;roam-hugo
|
||||
(setq org-hugo-base-dir "~/Documents/roam-publish/")
|
||||
|
||||
(defun my/org-roam-filter-by-tag (tag-name)
|
||||
(lambda (node)
|
||||
(member tag-name (org-roam-node-tags node))))
|
||||
|
||||
(defun my/org-roam-list-notes-by-tag (tag-name)
|
||||
(mapcar #'org-roam-node-file
|
||||
(seq-filter
|
||||
(daviwil/org-roam-filter-by-tag tag-name)
|
||||
(org-roam-node-list))))
|
||||
|
||||
(defun my/org-roam-export-all ()
|
||||
"Re-exports all Org-roam files to Hugo markdown."
|
||||
(interactive)
|
||||
(dolist (org-file (my/org-roam-list-notes-by-tag "publish"))
|
||||
;(dolist (org-file (directory-files-recursively org-roam-directory "\.org$"))
|
||||
(with-current-buffer (find-file org-file)
|
||||
(org-hugo-export-wim-to-md))))
|
||||
|
||||
(defun my/org-roam-creat-node ()
|
||||
"creat node and add IS_NODE property"
|
||||
(interactive)
|
||||
(org-id-get-create)
|
||||
(org-set-tags ":NODE:")
|
||||
(save-buffer)
|
||||
(org-hugo-export-wim-to-md))
|
||||
|
||||
;; org-roam
|
||||
(setq org-roam-directory "~/Nextcloud/Note/org-roam")
|
||||
(setq org-id-extra-files (org-roam--list-files org-roam-directory))
|
||||
(setq org-roam-capture-templates
|
||||
'(("m" "main" plain
|
||||
"%?"
|
||||
:if-new (file+head "main/${slug}.org"
|
||||
"#+title: ${title}\n")
|
||||
"#+title: ${title}\n#+date: %T\n#+hugo_auto_set_lastmod: t\n")
|
||||
:immediate-finish t
|
||||
:unnarrowed t)
|
||||
("r" "reference" plain "%?"
|
||||
:if-new
|
||||
(file+head "reference/${title}.org" "#+title: ${title}\n")
|
||||
(file+head "reference/${title}.org" "#+title: ${title}\n#+date: %T\n#+hugo_auto_set_lastmod: t\n")
|
||||
:immediate-finish t
|
||||
:unnarrowed t)
|
||||
("t" "ttk" plain "%?"
|
||||
:if-new
|
||||
(file+head "ttk/${title}.org" "#+title: ${title}\n")
|
||||
(file+head "ttk/${title}.org" "#+title: ${title}\n#+date: %T\n#+hugo_auto_set_lastmod: t\n")
|
||||
:immediate-finish t
|
||||
:unnarrowed t)
|
||||
("a" "article" plain "%?"
|
||||
:if-new
|
||||
(file+head "articles/${title}.org" "#+title: ${title}\n#+filetags: :article:\n")
|
||||
(file+head "articles/${title}.org" "#+title: ${title}\n#+date: %T\n#+filetags: :article: :publish:\n#+hugo_auto_set_lastmod: t\n")
|
||||
:immediate-finish t
|
||||
:unnarrowed t)))
|
||||
|
||||
(setq org-roam-dailies-capture-templates
|
||||
'(("d" "default" entry
|
||||
"* %?"
|
||||
:target (file+head "%<%Y-%m-%d>.org"
|
||||
"#+title: %<%Y-%m-%d>\n#+date: %T\n#+hugo_auto_set_lastmod: t\n"))))
|
||||
|
||||
;; org-roam-ui
|
||||
(use-package! websocket
|
||||
:after org-roam)
|
||||
|
|
19
init.el
19
init.el
|
@ -82,12 +82,12 @@
|
|||
:checkers
|
||||
syntax ; tasing you for every semicolon you forget
|
||||
;;(spell +flyspell) ; tasing you for misspelling mispelling
|
||||
;;grammar ; tasing grammar mistake every you make
|
||||
grammar ; tasing grammar mistake every you make
|
||||
|
||||
:tools
|
||||
;;ansible
|
||||
;;biblio ; Writes a PhD for you (citation needed)
|
||||
;;debugger ; FIXME stepping through code, to help you add bugs
|
||||
(debugger +lsp) ; FIXME stepping through code, to help you add bugs
|
||||
;;direnv
|
||||
(docker +lsp)
|
||||
;;editorconfig ; let someone else argue about tabs vs spaces
|
||||
|
@ -116,7 +116,7 @@
|
|||
;;beancount ; mind the GAAP
|
||||
;;(cc +lsp) ; C > C++ == 1
|
||||
;;clojure ; java with a lisp
|
||||
;;common-lisp ; if you've seen one lisp, you've seen them all
|
||||
common-lisp ; if you've seen one lisp, you've seen them all
|
||||
;;coq ; proofs-as-programs
|
||||
;;crystal ; ruby at the speed of c
|
||||
;;csharp ; unity, .NET, and mono shenanigans
|
||||
|
@ -133,13 +133,14 @@
|
|||
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
|
||||
;;fsharp ; ML stands for Microsoft's Language
|
||||
;;fstar ; (dependent) types and (monadic) effects and Z3
|
||||
;;gdscript ; the language you waited for
|
||||
(gdscript
|
||||
+lsp) ; the language you waited for
|
||||
;;(go +lsp) ; the hipster dialect
|
||||
;;(haskell +lsp) ; a language that's lazier than I am
|
||||
;;hy ; readability of scheme w/ speed of python
|
||||
;;idris ; a language you can depend on
|
||||
json ; At least it ain't XML
|
||||
;;(java +lsp) ; the poster child for carpal tunnel syndrome
|
||||
;;java ; the poster child for carpal tunnel syndrome
|
||||
(javascript +lsp) ; all(hope(abandon(ye(who(enter(here))))))
|
||||
;;julia ; a better, faster MATLAB
|
||||
;;kotlin ; a better, slicker Java(Script)
|
||||
|
@ -157,7 +158,7 @@
|
|||
(org
|
||||
+roam2
|
||||
+pomodoro
|
||||
+hugo
|
||||
+pretty
|
||||
+gnuplot) ; organize your plain life in plain text
|
||||
;;php ; perl's insecure younger brother
|
||||
;;plantuml ; diagrams for confusing people more
|
||||
|
@ -172,9 +173,9 @@
|
|||
;;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) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
||||
;;scala ; java, but good
|
||||
;;(scheme +guile) ; a fully conniving family of lisps
|
||||
(scheme +guile) ; a fully conniving family of lisps
|
||||
sh ; she sells {ba,z,fi}sh shells on the C xor
|
||||
;;sml
|
||||
;;solidity ; do you need a blockchain? No.
|
||||
|
@ -191,7 +192,7 @@
|
|||
|
||||
:app
|
||||
;;calendar
|
||||
;;emms
|
||||
emms
|
||||
everywhere ; *leave* Emacs!? You must be joking
|
||||
;;irc ; how neckbeards socialize
|
||||
(rss +org) ; emacs as an RSS reader
|
||||
|
|
12
packages.el
12
packages.el
|
@ -51,11 +51,16 @@
|
|||
(package! rime)
|
||||
(package! cnfonts)
|
||||
(package! tldr)
|
||||
(package! beacon)
|
||||
(package! clippy)
|
||||
(package! parrot)
|
||||
|
||||
(unpin! org-roam)
|
||||
(package! org-download)
|
||||
(package! org-transclusion)
|
||||
(package! org-fragtog)
|
||||
(package! org-roam-ui)
|
||||
(package! ox-hugo)
|
||||
|
||||
(package! ace-pinyin
|
||||
:recipe (:host github :repo "cute-jumper/ace-pinyin"))
|
||||
|
@ -63,15 +68,12 @@
|
|||
(package! fanyi)
|
||||
(package! sdcv
|
||||
:recipe (:host github :repo "manateelazycat/sdcv"))
|
||||
|
||||
(package! emacs-guess-word-game
|
||||
:recipe (:host github
|
||||
:repo "Qquanwei/emacs-guess-word-game" :files ("*")))
|
||||
|
||||
(package! impatient-mode)
|
||||
|
||||
(package! wallabag
|
||||
:recipe (:host github :repo "chenyanming/wallabag.el"
|
||||
:files ("*.el" "*.alist" "*.css")))
|
||||
(package! mastodon)
|
||||
|
||||
(package! parrot)
|
||||
(package! impatient-mode)
|
||||
|
|
Loading…
Reference in a new issue