diff options
author | Óscar Nájera <hi@oscarnajera.com> | 2021-04-23 19:24:53 +0200 |
---|---|---|
committer | Óscar Nájera <hi@oscarnajera.com> | 2021-04-23 19:24:53 +0200 |
commit | c1d57171119abf27792c5a4fad2f8f86458007de (patch) | |
tree | 6c77530d348259a2104447bb44913f4d059a2312 /config | |
parent | d0fe115925e1542d5948d82a3df1b8f6e989b29f (diff) | |
download | dotfiles-c1d57171119abf27792c5a4fad2f8f86458007de.tar.gz dotfiles-c1d57171119abf27792c5a4fad2f8f86458007de.tar.bz2 dotfiles-c1d57171119abf27792c5a4fad2f8f86458007de.zip |
Start doom literate
Diffstat (limited to 'config')
-rw-r--r-- | config/doom/config.org | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/config/doom/config.org b/config/doom/config.org new file mode 100644 index 0000000..97a5a07 --- /dev/null +++ b/config/doom/config.org @@ -0,0 +1,81 @@ +#+begin_src emacs-lisp :comments no +;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- +#+end_src +* Personal information +#+begin_src emacs-lisp +(setq user-full-name "Óscar Nájera" + user-mail-address (if (string-equal (user-login-name) "on") + "oscar.najera@tribe29.com" + "hi@oscarnajera.com")) +#+end_src +* Editor +** Theme +#+begin_src emacs-lisp +(setq doom-font (font-spec :family "monospace" :size 22 :weight 'semi-light)) +(setq doom-theme 'doom-gruvbox) +#+end_src +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'. +#+begin_src emacs-lisp +;(setq display-line-numbers-type 'relative) +#+end_src +** Package Manager +Doom manages packages separately. Keep that file separate +#+begin_src emacs-lisp :tangle "packages.el" +;; -*- no-byte-compile: t; -*- +;;; $DOOMDIR/packages.el +#+end_src +** SSH agent +#+begin_src emacs-lisp +(if (string-equal (user-login-name) "on") + (setenv "SSH_AUTH_SOCK" (concat "/run/user/1000/gnupg/S.gpg-agent.ssh")) + (setenv "SSH_AUTH_SOCK" (concat (getenv "XDG_RUNTIME_DIR")"/gnupg/S.gpg-agent.ssh"))) +#+end_src +** Avy +This allows me to jump to buffer positions using my home row ordering +#+begin_src emacs-lisp +(after! avy + (setq avy-keys '(?r ?t ?i ?e ?a ?o ?n ?s))) +#+end_src +** Which-key +Because I always need help and it should come up quickly +#+begin_src emacs-lisp +(setq which-key-idle-delay 0.1) +#+end_src +* Dictionary +#+begin_src emacs-lisp :tangle "packages.el" +(package! lexic) +#+end_src +Shamelessly copied from https://tecosaur.github.io/emacs-config/#dictionary +#+begin_src emacs-lisp +(use-package! lexic + :commands lexic-search lexic-list-dictionary + :config + (map! :map lexic-mode-map + :n "q" #'lexic-return-from-lexic + :nv "RET" #'lexic-search-word-at-point + :n "a" #'outline-show-all + :n "h" (cmd! (outline-hide-sublevels 3)) + :n "o" #'lexic-toggle-entry + :n "n" #'lexic-next-entry + :n "N" (cmd! (lexic-next-entry t)) + :n "p" #'lexic-previous-entry + :n "P" (cmd! (lexic-previous-entry t)) + :n "E" (cmd! (lexic-return-from-lexic) ; expand + (switch-to-buffer (lexic-get-buffer))) + :n "M" (cmd! (lexic-return-from-lexic) ; minimise + (lexic-goto-lexic)) + :n "C-p" #'lexic-search-history-backwards + :n "C-n" #'lexic-search-history-forwards + :n "/" (cmd! (call-interactively #'lexic-search)))) +#+end_src +#+begin_src emacs-lisp +(defadvice! +lookup/dictionary-definition-lexic (identifier &optional arg) + "Look up the definition of the word at point (or selection) using `lexic-search'." + :override #'+lookup/dictionary-definition + (interactive + (list (or (doom-thing-at-point-or-region 'word) + (read-string "Look up in dictionary: ")) + current-prefix-arg)) + (lexic-search identifier nil nil t)) +#+end_src |