blob: 7f00a60d2a98b1b207bb27576b4e407faa7bbf5a (
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
|
#+TITLE: config
* Font settings
#+BEGIN_SRC emacs-lisp
(setq
doom-font (font-spec :family "Fira Code" :size 14)
doom-big-font (font-spec :family "Fira Code" :size 24)
doom-variable-pitch-font (font-spec :family "Fira Code" :size 16))
#+END_SRC
* Themes
#+BEGIN_SRC emacs-lisp
(use-package! paper-theme)
(use-package! modus-operandi-theme)
(use-package! modus-vivendi-theme)
#+END_SRC
* Projectile
Projectile Path
#+BEGIN_SRC emacs-lisp
(setq projectile-project-search-path '("~/code"))
#+END_SRC
* Relative line numbers
#+BEGIN_SRC emacs-lisp
(setq display-line-numbers-type 'relative)
#+END_SRC
* Org
#+BEGIN_SRC emacs-lisp
(add-hook 'org-mode-hook #'auto-fill-mode)
#+END_SRC
#+BEGIN_SRC emacs-lisp
(after! org
(map! :map org-mode-map
:n "M-j" #'org-metadown
:n "M-k" #'org-metaup
))
#+END_SRC
Org capture
#+BEGIN_SRC emacs-lisp
(after! org
(defvar org-capture-todo-file "~/org/todo.org" )
(setq org-capture-templates '(("t" "Personal todo" entry
(file+headline org-capture-todo-file "Inbox")
"* TODO %?\n%i\n%a" :prepend t :kill-buffer t)
("n" "Personal notes" entry
(file+headline +org-capture-notes-file "Inbox")
"* %u %?\n%i\n%a" :prepend t :kill-buffer t)
("p" "Templates for projects")
("pt" "Project todo" entry
(file+headline org-capture-project-todo-file "Inbox")
"* TODO %?\n%i\n%a" :prepend t :kill-buffer t)
("pn" "Project notes" entry
(file+headline +org-capture-project-notes-file "Inbox")
"* TODO %?\n%i\n%a" :prepend t :kill-buffer t)
("pc" "Project changelog" entry
(file+headline +org-capture-project-notes-file "Unreleased")
"* TODO %?\n%i\n%a" :prepend t :kill-buffer t))))
#+END_SRC
Org Super Agenda
#+BEGIN_SRC emacs-lisp
(use-package! org-super-agenda
:after org-agenda
:init
(setq org-super-agenda-groups '((:name "Today"
:time-grid t
:scheduled today)
(:name "Due today"
:deadline today)
(:name "Important"
:priority "A")
(:name "Overdue"
:deadline past)
(:name "Due soon"
:deadline future)
(:name "Big Outcomes"
:tag "bo")))
:config
(org-super-agenda-mode)
)
#+END_SRC
* IMenu
#+BEGIN_SRC emacs-lisp
(setq imenu-anywhere-delimiter ": ")
(add-hook 'imenu-after-jump-hook #'better-jumper-set-jump)
(after! imenu-list
(setq imenu-list-idle-update-delay 0.5)
(set-popup-rule! "^\\*Ilist"
:side 'right :size 35 :quit nil :select nil :ttl 0))
#+END_SRC
* Tramp
#+BEGIN_SRC emacs-lisp
(setf tramp-shell-prompt-pattern "\\(?:^\\|^M\\)[^]#$%>\n]*#?[]#$%>].* *\\(^[\\[[0-9;]*[a-zA-Z] *\\)*")
#+END_SRC
* Leader keys
#+BEGIN_SRC emacs-lisp
;;(map! :leader
;; (:prefix-map ("/" . "search"))
;; (:when (featurep! :ui workspaces)
;; (:prefix-map ("TAB" . "workspace")))
;; (:prefix-map ("b" . "buffer"))
;; (:prefix-map ("c" . "code"))
;; (:prefix-map ("f" . "file"))
;; (:prefix-map ("g" . "git"))
;; (:prefix-map ("i" . "insert"))
;; (:prefix-map ("n" . "notes"))
;; (:prefix-map ("o" . "open")
;; (:prefix-map ("p" . "project"))
;; (:prefix-map ("q" . "session"))
;; (:when (featurep! :editor upload)
;; (:prefix-map ("r" . "remote")))
;; (:when (featurep! :editor snipets)
;; (:prefix-map ("s" . "snippets")))
;; (:prefix-map ("t" . "toggle")
;; :desc "Toggle imenu-list" "m" #'imenu-list-smart-toggle)))
#+END_SRC
* Dired
Do what I mean target allows dired to use window context for copying and moving
#+BEGIN_SRC emacs-lisp
(setq dired-dwim-target t)
#+END_SRC
* Laguages
c++
#+BEGIN_SRC emacs-lisp
(use-package! cmake-ide
:after rtags
:config
(require 'rtags)
(cmake-ide-setup))
#+END_SRC
* LSP
** C++
#+BEGIN_SRC emacs-lisp
(use-package! eglot
:config
(add-to-list 'eglot-server-programs '((c++-mode c-mode) "clangd"))
(add-hook! (c++-mode c-mode) 'eglot-ensure))
#+END_SRC
** Java
#+BEGIN_SRC emacs-lisp
;; (after! eglot
;; (defconst my-eclipse-jdt-home "/home/peter/.emacs.d/.cache/lsp/eclipse.jdt.ls/plugins/org.eclipse.equinox.launcher_1.5.800.v20200727-1323.jar")
;; (defun my-eglot-eclipse-jdt-contact (interactive)
;; "contact with the jdt server input INETRACTIVE."
;; (let ((cp (getenv "CLASSPATH")))
;; (setenv "CLASSPATH" (concat my-eclipse-jdt-home ":" cp))
;; (unwind-protect (eglot--eclipse-jdt-contact nil)
;; (setenv "CLASSPATH" cp))))
;; (setcdr (assq 'java-mode eglot-server-programs) #'my-eglot-eclipse-jdt-contact)
;; (add-hook 'java-mode-hook 'eglot-ensure))
#+END_SRC
* Ledger
#+BEGIN_SRC emacs-lisp
(setq ledger-default-date-format "%Y-%m-%d")
#+END_SRC
|