Compare commits
No commits in common. "cbc038eb1d91afb00a92216aa4fc4ebb9f02c86b" and "f2b5942f7ddc845e1d396ac0dedce4e76440d8f4" have entirely different histories.
cbc038eb1d
...
f2b5942f7d
13
.gitignore
vendored
13
.gitignore
vendored
|
@ -1,5 +1,14 @@
|
||||||
*.el
|
config.*
|
||||||
!.dir-locals.el
|
!config.org
|
||||||
|
init.el
|
||||||
|
packages.el
|
||||||
|
cli.el
|
||||||
|
|
||||||
|
subconf/
|
||||||
|
modules/
|
||||||
|
|
||||||
_minted-config
|
_minted-config
|
||||||
|
abbrev.el
|
||||||
|
|
||||||
|
!.dir-locals.el
|
||||||
~*
|
~*
|
||||||
|
|
115
config.org
115
config.org
|
@ -775,9 +775,12 @@ Emacs's runtime and configuration systems are designed to be as flexible as poss
|
||||||
|
|
||||||
#+begin_src emacs-lisp :tangle packages.el
|
#+begin_src emacs-lisp :tangle packages.el
|
||||||
(package! el-patch)
|
(package! el-patch)
|
||||||
|
|
||||||
|
(after! el-patch
|
||||||
|
(setq el-patch-warn-on-eval-template nil))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
The package allows you to define /patches/ which modify the definitions of functions in systematic ways. The suite of tools provided by the package is easily comprehensive enough for my needs, but we can make the API a bit nicer with some macros and configure options:
|
The package allows you to define /patches/ which modify the definitions of functions in systematic ways. The suite of tools provided by the package is easily comprehensive enough for my needs, but we can make the API a bit nicer with some macros:
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defmacro defpatch! (feature type-name &rest args)
|
(defmacro defpatch! (feature type-name &rest args)
|
||||||
|
@ -802,9 +805,6 @@ The package allows you to define /patches/ which modify the definitions of funct
|
||||||
(after! ,feature
|
(after! ,feature
|
||||||
,template))
|
,template))
|
||||||
template)))
|
template)))
|
||||||
|
|
||||||
(after! el-patch
|
|
||||||
(setq el-patch-warn-on-eval-template nil))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Automated Nix Builds
|
** Automated Nix Builds
|
||||||
|
@ -1351,7 +1351,7 @@ split."
|
||||||
(unless (or (eq w window)
|
(unless (or (eq w window)
|
||||||
(window-dedicated-p w))
|
(window-dedicated-p w))
|
||||||
(throw 'done nil)))
|
(throw 'done nil)))
|
||||||
frame nil 'nomini)
|
frame)
|
||||||
t)))
|
t)))
|
||||||
(not (window-minibuffer-p window))
|
(not (window-minibuffer-p window))
|
||||||
(let (((el-patch-swap split-height-threshold
|
(let (((el-patch-swap split-height-threshold
|
||||||
|
@ -2097,7 +2097,8 @@ Having an IDE-style tooltip pop up is nice, but ~flymake-popon~ is a bit ugly by
|
||||||
*** Popups
|
*** Popups
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(set-popup-rule! "^\\*Flymake" :vslot 1 :side 'bottom)
|
(after! flymake
|
||||||
|
(set-popup-rule! "^\\*Flymake" :vslot 1 :side 'bottom))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Git
|
** Git
|
||||||
|
@ -2375,17 +2376,6 @@ Now that we have this word list, we can also plug it into ~cape-dict~ and get pr
|
||||||
(add-hook! 'completion-at-point-functions :local :depth 40 #'cape-dict))
|
(add-hook! 'completion-at-point-functions :local :depth 40 #'cape-dict))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Undo Tree
|
|
||||||
|
|
||||||
#+call: confpkg("Pkg: undo-tree")
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(after! undo-tree
|
|
||||||
(setq undo-tree-visualizer-diff nil))
|
|
||||||
|
|
||||||
(set-popup-rule! "^ \\*undo-tree\\*" :slot 2 :side 'right :size 30 :select t :quit nil)
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** VTerm
|
** VTerm
|
||||||
|
|
||||||
#+call: confpkg("Pkg: vterm")
|
#+call: confpkg("Pkg: vterm")
|
||||||
|
@ -2727,10 +2717,9 @@ I use the standard Unix-style password management system, [[https://www.password
|
||||||
(after! pass
|
(after! pass
|
||||||
(setq pass-show-keybindings nil ; Keybindings take up too much space
|
(setq pass-show-keybindings nil ; Keybindings take up too much space
|
||||||
pass-suppress-confirmations t ; Quit shouldn't need a confirm step
|
pass-suppress-confirmations t ; Quit shouldn't need a confirm step
|
||||||
))
|
)
|
||||||
|
;; Move to right side
|
||||||
;; Move to right side
|
(set-popup-rule! "^\\*Password-Store" :side 'right :size 0.25 :quit nil))
|
||||||
(set-popup-rule! "^\\*Password-Store" :side 'right :size 0.25 :quit nil)
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Tweaks
|
*** Tweaks
|
||||||
|
@ -2958,15 +2947,10 @@ It's sometimes nice to be able to click a link in an Org file that takes me to o
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(after! org
|
(after! org
|
||||||
(setq org-pretty-entities t
|
(setq org-pretty-entities t)
|
||||||
org-entities-user
|
(pushnew! org-entities-user
|
||||||
'(("top" "\\top" t "⊤" "" "22A4" "⊤")
|
'("top" "\\top" t "⊤" "" "22A4" "⊤")
|
||||||
("bot" "\\bot" t "⊥" "" "22A5" "⊥")
|
'("bot" "\\bot" t "⊥" "" "22A5" "⊥")))
|
||||||
("bbN" "\\mathbb{N}" t "" "" "2115" "ℕ")
|
|
||||||
("bbZ" "\\mathbb{Z}" t "" "" "2124" "ℤ")
|
|
||||||
("bbQ" "\\mathbb{Q}" t "" "" "211A" "ℚ")
|
|
||||||
("bbR" "\\mathbb{R}" t "" "" "211D" "ℝ")
|
|
||||||
("qed" "\\square" t "" "" "25A0" "■"))))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Modern
|
*** Modern
|
||||||
|
@ -4047,18 +4031,7 @@ The variable ~+workspaces-switch-project-function~ contains a function that is r
|
||||||
(setq +workspaces-switch-project-function #'dirvish))
|
(setq +workspaces-switch-project-function #'dirvish))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Bindings
|
*** Appearance
|
||||||
|
|
||||||
The Doom module's bindings for Evil users are currently a bit unpolished, so let's fix them up here.
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(map! :mode dirvish-mode
|
|
||||||
:after dirvish
|
|
||||||
:m "C-o" #'dirvish-history-go-backward
|
|
||||||
:m "C-i" #'dirvish-history-go-forward)
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
*** Layout
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(after! dirvish
|
(after! dirvish
|
||||||
|
@ -4066,43 +4039,10 @@ The Doom module's bindings for Evil users are currently a bit unpolished, so let
|
||||||
(setq dirvish-default-layout '(1 0.15 0.45))
|
(setq dirvish-default-layout '(1 0.15 0.45))
|
||||||
|
|
||||||
;; Show nested directories
|
;; Show nested directories
|
||||||
(pushnew! dirvish-attributes 'collapse))
|
(pushnew! dirvish-attributes 'collapse)
|
||||||
#+end_src
|
|
||||||
|
|
||||||
*** Faces
|
;; Set dirvish line highlight to something less blinding
|
||||||
|
|
||||||
The faces that ~dirvish~ uses to indicate git changes are showing up as gray by default, and the face that it uses to highlight the current line is a bit bright.
|
|
||||||
|
|
||||||
To fix the line highlight we can just configure the relevant face (~dirvish-hl-line~), but the faces used by =dirvish-vc= actually inherit from faces for a built-in emacs library =vc=, so it makes more sense to customize those instead.
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(after! dirvish
|
|
||||||
(set-face-attribute 'dirvish-hl-line nil :inherit 'hl-line))
|
(set-face-attribute 'dirvish-hl-line nil :inherit 'hl-line))
|
||||||
|
|
||||||
(after! vc
|
|
||||||
(set-face-attribute 'vc-edited-state nil
|
|
||||||
:foreground (doom-color 'orange))
|
|
||||||
(set-face-attribute 'vc-locally-added-state nil
|
|
||||||
:foreground (doom-color 'green))
|
|
||||||
(set-face-attribute 'vc-conflict-state nil
|
|
||||||
:foreground (doom-color 'red))
|
|
||||||
(set-face-attribute 'vc-needs-update-state nil
|
|
||||||
:foreground (doom-color 'red))
|
|
||||||
(set-face-attribute 'vc-missing-state nil
|
|
||||||
:foreground (doom-color 'comments)))
|
|
||||||
(after! dirvish-vc
|
|
||||||
(set-face-attribute 'dirvish-vc-unregistered-face nil
|
|
||||||
:foreground (doom-color 'grey)))
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
*** =dirvish-fd=
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(after! dirvish-fd
|
|
||||||
(setq dirvish-fd-program
|
|
||||||
(if-let ((path (nix-build-out-path-gcroot "fd" "nixpkgs#fd")))
|
|
||||||
(concat path "/bin/fd")
|
|
||||||
(error "Building fd for dirvish-fd failed"))))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Sidebar Project Tree
|
*** Sidebar Project Tree
|
||||||
|
@ -4113,8 +4053,8 @@ I used to use =treemacs= as my dedicated project tree, but ~dirvish~ is much mor
|
||||||
(defun ~/dirvish-side-open (&optional path)
|
(defun ~/dirvish-side-open (&optional path)
|
||||||
"Select the Dirvish side session, creating one if it does not exist.
|
"Select the Dirvish side session, creating one if it does not exist.
|
||||||
|
|
||||||
If called with \\[universal-argument], prompt for PATH, otherwise
|
If called with \\[universal-arguments], prompt for PATH, otherwise
|
||||||
it defaults to `project-current'."
|
it defaults to `project-current'."
|
||||||
(interactive (list (and current-prefix-arg
|
(interactive (list (and current-prefix-arg
|
||||||
(read-directory-name "Open sidetree: "))))
|
(read-directory-name "Open sidetree: "))))
|
||||||
(require 'dirvish-side)
|
(require 'dirvish-side)
|
||||||
|
@ -4152,7 +4092,8 @@ If a side session is open, we'll configure =winum= to record it as having the in
|
||||||
Operators being in italics looks ugly, so let's fix that.
|
Operators being in italics looks ugly, so let's fix that.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(custom-set-faces! '(haskell-operator-face :slant normal))
|
(after! haskell-mode
|
||||||
|
(custom-set-faces! '(haskell-operator-face :slant normal)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Idris
|
** Idris
|
||||||
|
@ -4226,7 +4167,8 @@ The Doom module is very outdated, so I'll be overriding it.
|
||||||
Operators being in italics looks ugly in this mode too, but due to Idris's more complicated syntax highlighting system we have to do a bit more work than for Haskell. There's also the issue of the semantic highlighting faces, which don't match our theme colors.
|
Operators being in italics looks ugly in this mode too, but due to Idris's more complicated syntax highlighting system we have to do a bit more work than for Haskell. There's also the issue of the semantic highlighting faces, which don't match our theme colors.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(custom-set-faces!
|
(after! idris-mode
|
||||||
|
(custom-set-faces!
|
||||||
'((idris-operator-face idris-colon-face idris-equals-face) :slant normal)
|
'((idris-operator-face idris-colon-face idris-equals-face) :slant normal)
|
||||||
|
|
||||||
;; Semantic highlighting
|
;; Semantic highlighting
|
||||||
|
@ -4234,7 +4176,7 @@ Operators being in italics looks ugly in this mode too, but due to Idris's more
|
||||||
`(idris-semantic-data-face :foreground ,(doom-color 'red))
|
`(idris-semantic-data-face :foreground ,(doom-color 'red))
|
||||||
`(idris-semantic-bound-face :foreground ,(doom-color 'magenta) :slant italic)
|
`(idris-semantic-bound-face :foreground ,(doom-color 'magenta) :slant italic)
|
||||||
`(idris-semantic-function-face :foreground ,(doom-color 'dark-green))
|
`(idris-semantic-function-face :foreground ,(doom-color 'dark-green))
|
||||||
`(idris-semantic-postulate-face :foreground ,(doom-color 'yellow)))
|
`(idris-semantic-postulate-face :foreground ,(doom-color 'yellow))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Indentation
|
** Indentation
|
||||||
|
@ -4257,7 +4199,6 @@ The =lsp-java= package provides LSP support using the standard Java language ser
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defun +lsp-java-server-store-path ()
|
(defun +lsp-java-server-store-path ()
|
||||||
"Return the Nix store derivation path to the Java language server."
|
"Return the Nix store derivation path to the Java language server."
|
||||||
(require 'lsp-java)
|
|
||||||
(string-remove-suffix
|
(string-remove-suffix
|
||||||
(concat "/bin/" lsp-java-jdt-ls-command)
|
(concat "/bin/" lsp-java-jdt-ls-command)
|
||||||
(or
|
(or
|
||||||
|
@ -4289,14 +4230,6 @@ Since I've started using [[https://github.com/elkowar/eww/tree/master?tab=readme
|
||||||
(package! yuck-mode)
|
(package! yuck-mode)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Slint
|
|
||||||
|
|
||||||
#+call: confpkg("Mode: Slint")
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp :tangle packages.el
|
|
||||||
(package! slint-mode)
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
* Scratch :noexport:
|
* Scratch :noexport:
|
||||||
|
|
||||||
#+call: confpkg()
|
#+call: confpkg()
|
||||||
|
|
Loading…
Reference in a new issue