aboutsummaryrefslogtreecommitdiffstats
path: root/config/doom/config.org
blob: 41cfdf34aa70bbef29650fd28afe3e58f4913458 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#+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
** Ace window
#+begin_src emacs-lisp
(after! ace-window
  (setq aw-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
  (set-evil-initial-state! 'lexic-mode 'emacs))
#+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
* Orgmode
#+begin_src emacs-lisp
(after! org
  (setcdr (assoc "j" org-capture-templates)
          '("Journal" entry (file+olp+datetree +org-capture-journal-file)
            "* %(format-time-string \"%H:%M\") %?\n%a\n%i
- Timebox days

- I am grateful for
- What would make today great
- Daily affirmations
- Amazing things that happened yesterday
- How could I have made yesterday even better?"
            :clock-in t :clock-resume t))

  (add-to-list 'org-capture-templates
               `("e" "Event" entry (file ,(expand-file-name
                                           "caldav.org" org-directory))
                 "* %?\n%^T\n%i\n%a")))
#+end_src