From a99afc3da7ff4b804c93f100a7e6cdee5dcc0ba6 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Fri, 27 Mar 2020 15:51:22 +0000 Subject: Update doom configuration --- doom/config.el | 78 ++++++++++++++++++++++++++++++++------------------------ doom/init.el | 26 +++++++++---------- doom/packages.el | 14 +++++++--- 3 files changed, 68 insertions(+), 50 deletions(-) (limited to 'doom') diff --git a/doom/config.el b/doom/config.el index 9ebeafa..d394560 100644 --- a/doom/config.el +++ b/doom/config.el @@ -26,7 +26,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 'sanityinc-tomorrow-night) +(setq doom-theme 'modus-operandi) ;; 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! @@ -76,19 +76,6 @@ (global-set-key (kbd "C-`") #'push-mark-no-activate) (global-set-key (kbd "M-`") #'jump-to-mark) -;; Delete an emacs client frame. -(defun y/exit-emacs-client () - "consistent exit emacsclient. If not in emacs client, echo a - message in minibuffer, don't exit emacs. If in server mode and - editing file, do C-x # server-edit else do C-x 5 0 - delete-frame" - (interactive) - (if server-buffer-clients - (server-edit) - (delete-frame))) - -(global-set-key (kbd "C-c q") #'y/exit-emacs-client) - ;; Swap two window positions. (defun y/swap-windows () "Swaps two windows and leaves the cursor in the original one" @@ -106,6 +93,14 @@ (define-key y-map (kbd "g") 'password-store-generate) (define-key y-map (kbd "r") 'toggle-rot13-mode) +;; Mac configuration +(when (eq system-type 'darwin) + (setq mac-right-option-modifier 'none + mac-option-key-is-meta nil + mac-command-key-is-meta t + mac-command-modifier 'meta + mac-option-modifier nil)) + (defun y/insert-date () "Insert a timestamp according to locale's date and time format." (interactive) @@ -148,7 +143,7 @@ :config (global-hungry-delete-mode)) ;; Org configuration -(use-package org +(use-package! org :mode ("\\.org\\'" . org-mode) :init (map! :map org-mode-map @@ -192,16 +187,14 @@ ("~/Dropbox/org/someday.org" :level . 1) ("~/Dropbox/org/tickler.org" :maxlevel . 2) (,(format-time-string "~/Dropbox/org/journals/%Y-%m.org") :maxlevel . 2)) - org-todo-keywords '((sequence "TODO(t)" "WAITING(w)" "|" "DONE(d)" "CANCELLED(c)"))) - -;; Set custom agenda commands which can be activated in the agenda viewer. -(setq org-agenda-custom-commands - '(("w" "At work" tags-todo "@work" - ((org-agenda-overriding-header "Work"))) - ("h" "At home" tags-todo "@home" - ((org-agenda-overriding-header "Home"))) - ("u" "At uni" tags-todo "@uni" - ((org-agenda-overriding-header "University"))))) + ;; Set custom agenda commands which can be activated in the agenda viewer. + org-agenda-custom-commands + '(("w" "At work" tags-todo "@work" + ((org-agenda-overriding-header "Work"))) + ("h" "At home" tags-todo "@home" + ((org-agenda-overriding-header "Home"))) + ("u" "At uni" tags-todo "@uni" + ((org-agenda-overriding-header "University"))))) ;; Set up org ref for PDFs (use-package! org-ref @@ -214,6 +207,20 @@ org-ref-pdf-directory "~/Dropbox/bibliography/papers/") (setq org-ref-completion-library 'org-ref-ivy-cite)) +;; Set up org-noter +(use-package! org-noter + :after org + :commands org-noter + :config (setq org-noter-default-notes-file-names '("notes.org") + org-noter-notes-search-path '("~/org/bibliography") + org-noter-separate-notes-from-heading t)) + +(use-package! org-superstar + :hook (org-mode . org-superstar-mode) + :config + (setq org-superstar-headline-bullets-list '("⁖" "◉" "○" "✸") + org-superstar-special-todo-items t)) + ;; Set up org registers to quickly jump to files that I use often. (set-register ?l (cons 'file "~/.emacs.d/loader.org")) (set-register ?m (cons 'file "~/Dropbox/org/main.org")) @@ -224,14 +231,15 @@ (setq ispell-dictionary "en_GB") (use-package! flyspell + :hook (text-mode . flyspell-mode) :config (define-key flyspell-mode-map (kbd "C-.") nil) (define-key flyspell-mode-map (kbd "C-,") nil)) ;; Set up zettelkasten mode (use-package! zettelkasten - :config - (zettelkasten-mode t)) + :bind-keymap + ("C-c k" . zettelkasten-mode-map)) ;; Publishing projects, this one is for the zettelkasten (setq org-publish-project-alist @@ -249,13 +257,15 @@ ))) (add-hook 'org-export-before-processing-hook 'zettelkasten-org-export-preprocessor) -;; Mac configuration -(when (eq system-type 'darwin) - (setq mac-right-option-modifier 'none - mac-option-key-is-meta nil - mac-command-key-is-meta t - mac-command-modifier 'meta - mac-option-modifier nil)) +;; Proof general configuration +(use-package! proof-general + :mode "\\.v\\'" + :config + (setq coq-compile-before-require t + proof-splash-enable nil + proof-auto-action-when-deactivating-scripting 'retract + proof-delete-empty-windows nil + proof-auto-raise-buffers t)) ;; Here are some additional functions/macros that could help you configure Doom: ;; diff --git a/doom/init.el b/doom/init.el index a6f2c65..2bd908e 100644 --- a/doom/init.el +++ b/doom/init.el @@ -36,7 +36,7 @@ modeline ; snazzy, Atom-inspired modeline, plus API ;;nav-flash ; blink the current line after jumping ;;neotree ; a project drawer, like NERDTree for vim - ophints ; highlight the region an operation acts on + ;;ophints ; highlight the region an operation acts on (popup +defaults) ; tame sudden yet inevitable temporary windows ;;pretty-code ; replace bits of code with pretty symbols ;;tabs ; an tab bar for Emacs @@ -50,7 +50,7 @@ :editor ;;(evil +everywhere); come to the dark side, we have cookies - file-templates ; auto-snippets for empty files + ;;file-templates ; auto-snippets for empty files fold ; (nigh) universal code folding ;;(format +onsave) ; automated prettiness ;;god ; run Emacs commands without modifier keys @@ -59,7 +59,7 @@ ;;objed ; text object editing for the innocent ;;parinfer ; turn lisp into python, sort of ;;rotate-text ; cycle region at point between text candidates - snippets ; my elves. They type so I don't have to + ;;snippets ; my elves. They type so I don't have to word-wrap ; soft wrapping with language-aware indent :emacs @@ -76,19 +76,19 @@ :checkers syntax ; tasing you for every semicolon you forget - (spell +hunspell) ; tasing you for misspelling mispelling - grammar ; tasing grammar mistake every you make + (spell +hunspell) ; tasing you for misspelling mispelling + ;;grammar ; tasing grammar mistake every you make :tools ;;ansible ;;debugger ; FIXME stepping through code, to help you add bugs direnv ;;docker - editorconfig ; let someone else argue about tabs vs spaces + 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 + ;;lookup ; navigate your code and its documentation ;;lsp macos ; MacOS-specific commands magit ; a git porcelain for Emacs @@ -104,23 +104,23 @@ :lang ;;agda ; types of types of types of types... ;;assembly ; assembly for fun or debugging - cc ; C/C++/Obj-C madness - clojure ; java with a lisp + cc ; C/C++/Obj-C madness + clojure ; java with a lisp ;;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 - data ; config/data formats + data ; config/data formats ;;elixir ; erlang done right ;;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 ;;ess ; emacs speaks statistics ;;faust ; dsp, but you get to keep your soul ;;fsharp ; ML stands for Microsoft's Language ;;fstar ; (dependent) types and (monadic) effects and Z3 ;;go ; the hipster dialect - (haskell +dante) ; a language that's lazier than I am + haskell ; a language that's lazier than I am ;;hy ; readability of scheme w/ speed of python ;;idris ; ;;(java +meghanada) ; the poster child for carpal tunnel syndrome @@ -153,7 +153,7 @@ ;;rest ; Emacs as a REST client ;;rst ; ReST in peace ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} - ;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() + rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() ;;scala ; java, but good ;;scheme ; a fully conniving family of lisps sh ; she sells {ba,z,fi}sh shells on the C xor diff --git a/doom/packages.el b/doom/packages.el index dbb4a59..6571f93 100644 --- a/doom/packages.el +++ b/doom/packages.el @@ -51,13 +51,21 @@ ;(package! builtin-package :recipe (:branch "develop")) ;; Disabling packages -(package! undo-tree :disable t) +(disable-packages! undo-tree org-bullets helm) -;; Org mode dependencies +;; `org-mode' dependencies (package! org-ref) +(package! org-noter) +;; `org-bullets' replacement +(package! org-superstar) + +;; Proof general +(package! proof-general) ;; Misc dependencies (package! hungry-delete) (package! color-theme-sanityinc-tomorrow) +(package! modus-operandi-theme) +(package! modus-vivendi-theme) (package! zettelkasten - :recipe (:host github :repo "ymherklotz/emacs-zettelkasten") :pin "a5bd657820") + :recipe (:host github :repo "ymherklotz/emacs-zettelkasten")) -- cgit