Compare commits
9 commits
b52cb8b1a8
...
0e393c6dc2
Author | SHA1 | Date | |
---|---|---|---|
Kiana Sheibani | 0e393c6dc2 | ||
Kiana Sheibani | 8dbed6bdba | ||
Kiana Sheibani | bdac52fca3 | ||
Kiana Sheibani | 2978acd30c | ||
Kiana Sheibani | cfd5a1c458 | ||
Kiana Sheibani | 283724a55b | ||
Kiana Sheibani | a330856332 | ||
Kiana Sheibani | f32b2002a6 | ||
Kiana Sheibani | 22f2515207 |
85
config.org
85
config.org
|
@ -1157,14 +1157,13 @@ It wouldn't be Emacs if there wasn't an endless list of config variables to chan
|
|||
)
|
||||
|
||||
(setq compile-command "nix build"
|
||||
truncate-string-ellipsis "…" ; Unicode!
|
||||
shell-file-name (executable-find "bash") ; Use bash instead of fish for default shell
|
||||
disabled-command-function nil ; Disabled commands are a stupid idea
|
||||
password-cache-expiry nil ; Security? Never heard of it
|
||||
scroll-margin 2 ; A few extra lines on each end of the window
|
||||
)
|
||||
|
||||
(global-subword-mode 1)
|
||||
(global-subword-mode +1)
|
||||
#+end_src
|
||||
|
||||
** Personal Information
|
||||
|
@ -1563,8 +1562,6 @@ Now that we've enabled our preferred modules and done some basic configuration,
|
|||
+corfu-want-tab-prefer-expand-snippets t
|
||||
+corfu-want-tab-prefer-navigating-org-tables t
|
||||
|
||||
+corfu-want-minibuffer-completion nil
|
||||
|
||||
corfu-min-width 25))
|
||||
#+end_src
|
||||
|
||||
|
@ -2101,11 +2098,11 @@ Having an IDE-style tooltip pop up is nice, but ~flymake-popon~ is a bit ugly by
|
|||
|
||||
** Git
|
||||
|
||||
#+call: confpkg("Pkg: magit")
|
||||
#+call: confpkg("Pkg: git")
|
||||
|
||||
I use GPG signing for commits, which means that committing often takes longer than the single second timeout. Eight seconds seems like a reasonable amount of time to type in a password.
|
||||
|
||||
Let's also increase the maximum length of commit summaries past the default of 50 characters, because that's a very restrictive limit.
|
||||
Let's also increase the maximum length of commit summaries past the default of 50 characters, because that's a somewhat restrictive limit.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(after! git-commit
|
||||
|
@ -2126,16 +2123,17 @@ Magit already looks great, but it could use some proper syntax highlighting!
|
|||
:hook (magit-mode . magit-delta-mode))
|
||||
#+end_src
|
||||
|
||||
** Language Servers
|
||||
*** Forge
|
||||
|
||||
#+call: confpkg("Pkg: lsp")
|
||||
|
||||
Some more convenient leader key bindings would be nice to prevent having to trawl through the =lsp-command-map=.
|
||||
Forge is a convenient package for working with remote code forges like GitHub, GitLab, etc. These days, I've mostly switched over to my own [[https://git.tokinanpa.dev/][personal forge]] instead of something public like GitHub, so I'll need to let Forge know about that.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(map! :leader
|
||||
:desc "Select LSP code lens"
|
||||
"c L" #'lsp-avy-lens)
|
||||
(after! forge
|
||||
(push '("git.tokinanpa.dev"
|
||||
"git.tokinanpa.dev/api/v1"
|
||||
"git.tokinanpa.dev"
|
||||
forge-gitea-repository)
|
||||
forge-alist))
|
||||
#+end_src
|
||||
|
||||
** Marginalia
|
||||
|
@ -2436,19 +2434,13 @@ With the basic config out of the way, we can implement popup-aware numbering by
|
|||
(after! winum
|
||||
(defun ~/winum-auto-assign (windows)
|
||||
"Assign indices to windows, handling popup windows separately."
|
||||
(let ((index 1) (popup-index 1))
|
||||
(let ((index 1) (popup-index '(popup . 1)))
|
||||
(dolist (w windows)
|
||||
(if (+popup-window-p w)
|
||||
(progn
|
||||
(while (member (cons 'popup popup-index)
|
||||
winum--assigned-indices)
|
||||
(setq popup-index (1+ popup-index)))
|
||||
(winum--assign w (cons 'popup popup-index))
|
||||
(setq popup-index (1+ popup-index)))
|
||||
(while (member index winum--assigned-indices)
|
||||
(setq index (1+ index)))
|
||||
(winum--assign w index)
|
||||
(setq index (1+ index))))))
|
||||
(winum--assign-unique
|
||||
w popup-index t
|
||||
(cons 'popup-index (1+ (cdr popup-index))))
|
||||
(winum--assign-unique w index t)))))
|
||||
(setq winum-auto-assign-function #'~/winum-auto-assign))
|
||||
#+end_src
|
||||
|
||||
|
@ -2482,7 +2474,8 @@ If prefix ARG is given, delete the window instead of selecting it." n)
|
|||
"Jump to popup window 0, or popup 10 if 0 is not assigned.
|
||||
If prefix ARG is given, delete the window instead of selecting it."
|
||||
(interactive "P")
|
||||
(let ((n (if (winum-get-window-by-index '(popup . 0)) '(popup . 0) '(popup . 10))))
|
||||
(let ((n (if (winum-get-window-by-index '(popup . 0))
|
||||
'(popup . 0) '(popup . 10))))
|
||||
(if arg
|
||||
(winum-delete-window-by-index n)
|
||||
(winum-select-window-by-index n))))
|
||||
|
@ -2602,6 +2595,7 @@ Calc doesn't use faces to show selections by default, which I think is rather st
|
|||
(setq calc-window-height 13 ; Make window taller
|
||||
calc-angle-mode 'rad ; Default to radians
|
||||
calc-symbolic-mode t ; Symbolic evaluation
|
||||
calc-kill-line-numbering nil ; Don't copy stack position numbers
|
||||
))
|
||||
#+end_src
|
||||
|
||||
|
@ -2714,7 +2708,8 @@ I use the standard Unix-style password management system, [[https://www.password
|
|||
))
|
||||
|
||||
;; Move to right side
|
||||
(set-popup-rule! "^\\*Password-Store" :side 'right :size 0.25 :quit nil)
|
||||
(after! pass
|
||||
(set-popup-rule! "^\\*Password-Store" :side 'right :size 0.25 :quit nil))
|
||||
#+end_src
|
||||
|
||||
*** Tweaks
|
||||
|
@ -2950,7 +2945,8 @@ It's sometimes nice to be able to click a link in an Org file that takes me to o
|
|||
("bbZ" "\\mathbb{Z}" t "" "" "2124" "ℤ")
|
||||
("bbQ" "\\mathbb{Q}" t "" "" "211A" "ℚ")
|
||||
("bbR" "\\mathbb{R}" t "" "" "211D" "ℝ")
|
||||
("qed" "\\square" t "" "" "25A0" "■"))))
|
||||
("qed" "\\square" t "" "" "2B1C" "⬜")
|
||||
("sqrt" "\\sqrt" t "" "" "221A" "√"))))
|
||||
#+end_src
|
||||
|
||||
*** Modern
|
||||
|
@ -3217,7 +3213,9 @@ If nil, then use the current time.")
|
|||
(lambda (&optional time) (funcall float-time-old (or time org-todo-time))))
|
||||
(time-subtract-old (symbol-function #'time-subtract))
|
||||
((symbol-function #'time-subtract)
|
||||
(lambda (a b) (funcall time-subtract-old (or a org-todo-time) (or b org-todo-time))))
|
||||
(lambda (a b) (funcall time-subtract-old
|
||||
(or a org-todo-time)
|
||||
(or b org-todo-time))))
|
||||
(decode-time-old (symbol-function #'decode-time))
|
||||
((symbol-function #'decode-time)
|
||||
(lambda (&optional time &rest args)
|
||||
|
@ -3486,7 +3484,7 @@ If on a:
|
|||
|
||||
When an explicit category is not specified, Org mode typically defaults to the filename (sans extension). This ... sort of makes sense? I guess? It doesn't really, because filename conventions don't make for good agenda category names. I want my category names to be in title case, whereas a file name is typically going to be all lowercase and without spaces. This is especially bad for Org-roam, where filenames are automatically generated and way too long to be a UI element.
|
||||
|
||||
To fix this issue, it's thankfully rather simple to patch Org-mode's category system. The following code sets things up so that the file's =#+title= metadata is used as the default category, falling back on the default behavior if a title is not given.
|
||||
To fix this issue, it's thankfully rather simple to patch Org-mode's metadata system. The following code sets things up so that the file's =#+title= metadata is used as the default category, falling back on the default behavior if a title is not given.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defadvice! ~/org-default-category (old-fn)
|
||||
|
@ -3757,9 +3755,9 @@ A full week-long agenda is usually too cluttered for me to read, so I'll narrow
|
|||
org-deadline-warning-days 7
|
||||
|
||||
org-agenda-sorting-strategy
|
||||
'((agenda time-up habit-down priority-down category-up)
|
||||
(todo habit-down priority-down time-up category-up)
|
||||
(tags habit-down priority-down time-up category-up)
|
||||
'((agenda time-up habit-down timestamp-up priority-down category-up)
|
||||
(todo habit-down priority-down category-up)
|
||||
(tags habit-down priority-down category-up)
|
||||
(search category-up))
|
||||
|
||||
;; Agenda files
|
||||
|
@ -4263,6 +4261,29 @@ The =lsp-java= package provides LSP support using the standard Java language ser
|
|||
"-data" (f-join root "java-workspace"))))
|
||||
#+end_src
|
||||
|
||||
** Language Servers
|
||||
|
||||
#+call: confpkg("Mode: LSP")
|
||||
|
||||
The emacs package =lsp-mode= is the package of choice for general LSP integration in Emacs. The Doom Emacs module =:tools lsp= handles most of the basic configuration for it, but there's one minor annoyance it doesn't cover: when a server isn't found for a particular language, =lsp-mode= tries to install the server itself to a local directory, which is a completely useless space-filler for my purposes since that I use NixOS.
|
||||
|
||||
There is luckily a configuration variable to disable this suggestion:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(after! lsp-mode
|
||||
(setq lsp-enable-suggest-server-download nil))
|
||||
#+end_src
|
||||
|
||||
*** Bindings
|
||||
|
||||
Some more convenient leader key bindings would be nice to prevent having to trawl through the =lsp-command-map=.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(map! :leader
|
||||
:desc "Select LSP code lens"
|
||||
"c L" #'lsp-avy-lens)
|
||||
#+end_src
|
||||
|
||||
** Yuck
|
||||
|
||||
#+call: confpkg("Mode: Yuck")
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit aca0f74f3a442b1b1a6f4315303c340f7c1005b8
|
||||
Subproject commit efa0aedb7c4c03fb287210cd248f5fad8d4442c9
|
Loading…
Reference in a new issue