mirror of
https://github.com/foo-dogsquared/dotfiles.git
synced 2025-02-07 06:18:59 +00:00
Update Emacs config
This commit is contained in:
parent
4d898c9116
commit
2a9a7459f6
@ -90,27 +90,33 @@
|
|||||||
|
|
||||||
; Configure org-roam.
|
; Configure org-roam.
|
||||||
org-roam-capture-templates '(
|
org-roam-capture-templates '(
|
||||||
("n" "notes" plain
|
("p" "permanent" plain
|
||||||
#'org-roam-capture--get-point
|
#'org-roam-capture--get-point
|
||||||
"#+author: \"%(user-full-name)\"
|
"#+date: \"%<%Y-%m-%d %T %:z>\"
|
||||||
#+email: \"%(user-mail-address)\"
|
|
||||||
#+date: \"%<%Y-%m-%d %T %:z>\"
|
|
||||||
#+date_modified: \"%<%Y-%m-%d %T %:z>\"
|
#+date_modified: \"%<%Y-%m-%d %T %:z>\"
|
||||||
#+language: en
|
#+language: en
|
||||||
#+options: toc:t
|
|
||||||
#+property: header-args :exports both
|
|
||||||
|
|
||||||
%?"
|
%?"
|
||||||
:file-name "%<%Y-%m-%d-%H-%M-%S>"
|
:file-name "%<%Y-%m-%d-%H-%M-%S>"
|
||||||
:head "#+title: ${title}\n"
|
:head "#+title: ${title}\n"
|
||||||
:unnarrowed t)
|
:unnarrowed t)
|
||||||
|
|
||||||
("d" "dailies" entry
|
("l" "literature" plain
|
||||||
#'org-roam-capture--get-point
|
#'org-roam-capture--get-point
|
||||||
"* %?"
|
"#+date: \"%<%Y-%m-%d %T %:z>\"
|
||||||
:file-name "daily/%<%Y-%m-%d>"
|
#+date_modified: \"%<%Y-%m-%d %T %:z>\"
|
||||||
:head "#+title %<%Y-%m-%d>"
|
#+language: en
|
||||||
:olp ("Study notes" "Random")))
|
|
||||||
|
%?"
|
||||||
|
:file-name "literature/%<%Y-%m-%d-%H-%M-%S>"
|
||||||
|
:head "#+title: ${title}\n")
|
||||||
|
|
||||||
|
("d" "dailies" entry
|
||||||
|
#'org-roam-capture--get-point
|
||||||
|
"* %?"
|
||||||
|
:file-name "daily/%<%Y-%m-%d>"
|
||||||
|
:head "#+title %<%Y-%m-%d>"
|
||||||
|
:olp ("Study notes" "Random")))
|
||||||
|
|
||||||
; Get the tags from vanilla and Roam-specific properties.
|
; Get the tags from vanilla and Roam-specific properties.
|
||||||
org-roam-tag-sources '(prop vanilla))
|
org-roam-tag-sources '(prop vanilla))
|
||||||
@ -126,13 +132,30 @@
|
|||||||
; Set the journal.
|
; Set the journal.
|
||||||
org-journal-dir "~/writings/journal"
|
org-journal-dir "~/writings/journal"
|
||||||
org-journal-file-format "%F"
|
org-journal-file-format "%F"
|
||||||
|
|
||||||
|
enable-local-variables "query"
|
||||||
)
|
)
|
||||||
|
|
||||||
; A workaround for electric-indent plugin.
|
; A workaround for electric-indent plugin.
|
||||||
; See https://github.com/hlissner/doom-emacs/issues/3172 for more details.
|
; See https://github.com/hlissner/doom-emacs/issues/3172 for more details.
|
||||||
(add-hook 'org-mode-hook (lambda () (electric-indent-local-mode -1)))
|
(add-hook 'org-mode (lambda ()
|
||||||
|
(electric-indent-local-mode -1)))
|
||||||
|
|
||||||
; Automate updating timestamps on save.
|
; Automate updating timestamps on save.
|
||||||
(add-hook 'before-save-hook 'time-stamp)
|
(add-hook! 'before-save-hook 'time-stamp)
|
||||||
|
|
||||||
|
; Set up Anki editor
|
||||||
|
(use-package! anki-editor
|
||||||
|
:hook (org-mode . anki-editor-mode)
|
||||||
|
:config
|
||||||
|
(setq anki-editor-create-decks 't)
|
||||||
|
(map! :localleader
|
||||||
|
:map org-mode-map
|
||||||
|
(:prefix ("C" . "Anki cards")
|
||||||
|
"p" #'anki-editor-push-notes
|
||||||
|
"P" #'anki-editor-retry-failure-notes
|
||||||
|
"i" #'anki-editor-insert-note
|
||||||
|
"d" #'anki-editor-cloze-region
|
||||||
|
"e" #'anki-editor-export-subtree-to-html)))
|
||||||
|
|
||||||
;;; config.el ends here
|
;;; config.el ends here
|
||||||
|
@ -89,7 +89,9 @@
|
|||||||
;;ein ; tame Jupyter notebooks with emacs
|
;;ein ; tame Jupyter notebooks with emacs
|
||||||
(eval +overlay) ; run code, run (also, repls)
|
(eval +overlay) ; run code, run (also, repls)
|
||||||
;;gist ; interacting with github gists
|
;;gist ; interacting with github gists
|
||||||
lookup ; navigate your code and its documentation
|
(lookup
|
||||||
|
+dictionary
|
||||||
|
+offline) ; navigate your code and its documentation
|
||||||
lsp
|
lsp
|
||||||
;;macos ; MacOS-specific commands
|
;;macos ; MacOS-specific commands
|
||||||
magit ; a git porcelain for Emacs
|
magit ; a git porcelain for Emacs
|
||||||
@ -104,67 +106,69 @@
|
|||||||
|
|
||||||
:lang
|
:lang
|
||||||
;;agda ; types of types of types of types...
|
;;agda ; types of types of types of types...
|
||||||
assembly ; assembly for fun or debugging
|
assembly ; assembly for fun or debugging
|
||||||
(cc +lsp) ; C/C++/Obj-C madness
|
(cc +lsp) ; C/C++/Obj-C madness
|
||||||
clojure ; java with a lisp
|
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
|
;;coq ; proofs-as-programs
|
||||||
;;crystal ; ruby at the speed of c
|
;;crystal ; ruby at the speed of c
|
||||||
csharp ; unity, .NET, and mono shenanigans
|
csharp ; unity, .NET, and mono shenanigans
|
||||||
data ; config/data formats
|
data ; config/data formats
|
||||||
(dart +flutter) ; paint ui and not much else
|
(dart +flutter) ; paint ui and not much else
|
||||||
;;elixir ; erlang done right
|
;;elixir ; erlang done right
|
||||||
;;elm ; care for a cup of TEA?
|
;;elm ; care for a cup of TEA?
|
||||||
emacs-lisp ; drown in parentheses
|
emacs-lisp ; drown in parentheses
|
||||||
;;erlang ; an elegant language for a more civilized age
|
;;erlang ; an elegant language for a more civilized age
|
||||||
ess ; emacs speaks statistics
|
ess ; emacs speaks statistics
|
||||||
;;faust ; dsp, but you get to keep your soul
|
;;faust ; dsp, but you get to keep your soul
|
||||||
;;fsharp ; ML stands for Microsoft's Language
|
;;fsharp ; ML stands for Microsoft's Language
|
||||||
;;fstar ; (dependent) types and (monadic) effects and Z3
|
;;fstar ; (dependent) types and (monadic) effects and Z3
|
||||||
gdscript ; the language I waited for
|
(gdscript +lsp) ; the language I waited for
|
||||||
;;(go +lsp) ; the hipster dialect
|
;;(go +lsp) ; the hipster dialect
|
||||||
(haskell +dante) ; a language that's lazier than I am
|
;;(haskell +dante) ; a language that's lazier than I am
|
||||||
;;hy ; readability of scheme w/ speed of python
|
;;hy ; readability of scheme w/ speed of python
|
||||||
;;idris ;
|
;;idris ;
|
||||||
;;(java +meghanada) ; the poster child for carpal tunnel syndrome
|
;;(java +meghanada) ; the poster child for carpal tunnel syndrome
|
||||||
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
|
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
|
||||||
julia ; a better, faster MATLAB
|
;;julia ; a better, faster MATLAB
|
||||||
kotlin ; a better, slicker Java(Script)
|
;;kotlin ; a better, slicker Java(Script)
|
||||||
(latex +latexmk) ; writing papers in Emacs has never been so fun
|
(latex +latexmk) ; writing papers in Emacs has never been so fun
|
||||||
;;lean
|
;;lean
|
||||||
;;factor
|
;;factor
|
||||||
;;ledger ; an accounting system in Emacs
|
;;ledger ; an accounting system in Emacs
|
||||||
lua ; one-based indices? one-based indices
|
lua ; one-based indices? one-based indices
|
||||||
markdown ; writing docs for people to ignore
|
markdown ; writing docs for people to ignore
|
||||||
nim ; python + lisp at the speed of c
|
nim ; python + lisp at the speed of c
|
||||||
nix ; I hereby declare "nix geht mehr!"
|
nix ; I hereby declare "nix geht mehr!"
|
||||||
ocaml ; an objective camel
|
;;ocaml ; an objective camel
|
||||||
(org +gnuplot
|
(org +gnuplot
|
||||||
+hugo
|
+hugo
|
||||||
+journal
|
+journal
|
||||||
+noter
|
+noter
|
||||||
+pandoc
|
+pandoc
|
||||||
+present
|
+present
|
||||||
+roam) ; organize your plain life in plain text
|
+roam) ; organize your plain life in plain text
|
||||||
raku ; write code no one else can comprehend
|
raku ; write code no one else can comprehend
|
||||||
;;php ; perl's insecure younger brother
|
;;php ; perl's insecure younger brother
|
||||||
;;plantuml ; diagrams for confusing people more
|
;;plantuml ; diagrams for confusing people more
|
||||||
;;purescript ; javascript, but functional
|
;;purescript ; javascript, but functional
|
||||||
python ; beautiful is better than ugly
|
(python +lsp
|
||||||
|
+pyright
|
||||||
|
+cython) ; beautiful is better than ugly
|
||||||
;;qt ; the 'cutest' gui framework ever
|
;;qt ; the 'cutest' gui framework ever
|
||||||
racket ; a DSL for DSLs
|
racket ; a DSL for DSLs
|
||||||
;;rest ; Emacs as a REST client
|
;;rest ; Emacs as a REST client
|
||||||
;;rst ; ReST in peace
|
;;rst ; ReST in peace
|
||||||
(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
(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
|
;;scala ; java, but good
|
||||||
scheme ; a fully conniving family of lisps
|
scheme ; a fully conniving family of lisps
|
||||||
sh ; she sells {ba,z,fi}sh shells on the C xor
|
sh ; she sells {ba,z,fi}sh shells on the C xor
|
||||||
;;sml
|
;;sml
|
||||||
;;solidity ; do you need a blockchain? No.
|
;;solidity ; do you need a blockchain? No.
|
||||||
;;swift ; who asked for emoji variables?
|
;;swift ; who asked for emoji variables?
|
||||||
;;terra ; Earth and Moon in alignment for performance.
|
;;terra ; Earth and Moon in alignment for performance.
|
||||||
web ; the tubes
|
web ; the tubes
|
||||||
|
|
||||||
:email
|
:email
|
||||||
;;(mu4e +gmail)
|
;;(mu4e +gmail)
|
||||||
@ -180,9 +184,5 @@
|
|||||||
:config
|
:config
|
||||||
;;literate
|
;;literate
|
||||||
(default +bindings +smartparens)
|
(default +bindings +smartparens)
|
||||||
|
|
||||||
;; This is where custom modules in the Doom directory should be put for orgaanizational purposes.
|
|
||||||
:tools
|
|
||||||
;;neuron ; Neurons are a must for the brain.
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -67,3 +67,9 @@
|
|||||||
:recipe (:host github
|
:recipe (:host github
|
||||||
:repo "dengste/minimap")
|
:repo "dengste/minimap")
|
||||||
:pin "8bc9a65825925a7c58b83ad389f07a93f22d60f3")
|
:pin "8bc9a65825925a7c58b83ad389f07a93f22d60f3")
|
||||||
|
|
||||||
|
; Anki
|
||||||
|
(package! anki-editor
|
||||||
|
:recipe (:host github
|
||||||
|
:repo "louietan/anki-editor")
|
||||||
|
:pin "546774a453ef4617b1bcb0d1626e415c67cc88df")
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name: Shorthand for e.g.
|
# name: Shorthand for e.g.
|
||||||
# key: copyright
|
# key: copyright
|
||||||
# condition: t
|
|
||||||
# --
|
# --
|
||||||
${1:Copyright © (format-time-string "%Y")} ${2:(user-full-name)} <`(user-mail-address)`>
|
${1:Copyright © (format-time-string "%Y")} ${2:(user-full-name)} <`(user-mail-address)`>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name: Shorthand for e.g.
|
# name: Shorthand for eg
|
||||||
# key: eg
|
# key: eg
|
||||||
# --
|
# --
|
||||||
(e.g., $1) $0
|
(e.g., $1) $0
|
||||||
|
5
emacs/snippets/org-mode/verbatim
Normal file
5
emacs/snippets/org-mode/verbatim
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: Org-Mode monospace
|
||||||
|
# key: vb
|
||||||
|
# --
|
||||||
|
=$1= $0
|
@ -16,13 +16,9 @@
|
|||||||
"[^[:word:]0-9]+"
|
"[^[:word:]0-9]+"
|
||||||
)) " " )
|
)) " " )
|
||||||
`}
|
`}
|
||||||
#+author: "`user-full-name`"
|
|
||||||
#+email: "`user-mail-address`"
|
|
||||||
#+date: "`(format-time-string "%Y-%m-%d %T %:z")`"
|
#+date: "`(format-time-string "%Y-%m-%d %T %:z")`"
|
||||||
#+date_modified: "`(format-time-string "%Y-%m-%d %T %:z")`"
|
#+date_modified: "`(format-time-string "%Y-%m-%d %T %:z")`"
|
||||||
#+language: en
|
#+language: en
|
||||||
#+options: toc:t
|
|
||||||
#+property: header-args :exports both
|
|
||||||
|
|
||||||
|
|
||||||
$0
|
$0
|
||||||
|
Loading…
Reference in New Issue
Block a user