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
|
||||
!.dir-locals.el
|
||||
config.*
|
||||
!config.org
|
||||
init.el
|
||||
packages.el
|
||||
cli.el
|
||||
|
||||
subconf/
|
||||
modules/
|
||||
|
||||
_minted-config
|
||||
abbrev.el
|
||||
|
||||
!.dir-locals.el
|
||||
~*
|
||||
|
|
127
config.org
127
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
|
||||
(package! el-patch)
|
||||
|
||||
(after! el-patch
|
||||
(setq el-patch-warn-on-eval-template nil))
|
||||
#+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
|
||||
(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
|
||||
,template))
|
||||
template)))
|
||||
|
||||
(after! el-patch
|
||||
(setq el-patch-warn-on-eval-template nil))
|
||||
#+end_src
|
||||
|
||||
** Automated Nix Builds
|
||||
|
@ -1351,7 +1351,7 @@ split."
|
|||
(unless (or (eq w window)
|
||||
(window-dedicated-p w))
|
||||
(throw 'done nil)))
|
||||
frame nil 'nomini)
|
||||
frame)
|
||||
t)))
|
||||
(not (window-minibuffer-p window))
|
||||
(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
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(set-popup-rule! "^\\*Flymake" :vslot 1 :side 'bottom)
|
||||
(after! flymake
|
||||
(set-popup-rule! "^\\*Flymake" :vslot 1 :side 'bottom))
|
||||
#+end_src
|
||||
|
||||
** 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))
|
||||
#+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
|
||||
|
||||
#+call: confpkg("Pkg: vterm")
|
||||
|
@ -2727,10 +2717,9 @@ I use the standard Unix-style password management system, [[https://www.password
|
|||
(after! pass
|
||||
(setq pass-show-keybindings nil ; Keybindings take up too much space
|
||||
pass-suppress-confirmations t ; Quit shouldn't need a confirm step
|
||||
))
|
||||
|
||||
;; Move to right side
|
||||
(set-popup-rule! "^\\*Password-Store" :side 'right :size 0.25 :quit nil)
|
||||
)
|
||||
;; Move to right side
|
||||
(set-popup-rule! "^\\*Password-Store" :side 'right :size 0.25 :quit nil))
|
||||
#+end_src
|
||||
|
||||
*** 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
|
||||
(after! org
|
||||
(setq org-pretty-entities t
|
||||
org-entities-user
|
||||
'(("top" "\\top" t "⊤" "" "22A4" "⊤")
|
||||
("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" "■"))))
|
||||
(setq org-pretty-entities t)
|
||||
(pushnew! org-entities-user
|
||||
'("top" "\\top" t "⊤" "" "22A4" "⊤")
|
||||
'("bot" "\\bot" t "⊥" "" "22A5" "⊥")))
|
||||
#+end_src
|
||||
|
||||
*** Modern
|
||||
|
@ -4047,18 +4031,7 @@ The variable ~+workspaces-switch-project-function~ contains a function that is r
|
|||
(setq +workspaces-switch-project-function #'dirvish))
|
||||
#+end_src
|
||||
|
||||
*** Bindings
|
||||
|
||||
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
|
||||
*** Appearance
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(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))
|
||||
|
||||
;; Show nested directories
|
||||
(pushnew! dirvish-attributes 'collapse))
|
||||
#+end_src
|
||||
(pushnew! dirvish-attributes 'collapse)
|
||||
|
||||
*** Faces
|
||||
|
||||
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 dirvish line highlight to something less blinding
|
||||
(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
|
||||
|
||||
*** 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)
|
||||
"Select the Dirvish side session, creating one if it does not exist.
|
||||
|
||||
If called with \\[universal-argument], prompt for PATH, otherwise
|
||||
it defaults to `project-current'."
|
||||
If called with \\[universal-arguments], prompt for PATH, otherwise
|
||||
it defaults to `project-current'."
|
||||
(interactive (list (and current-prefix-arg
|
||||
(read-directory-name "Open sidetree: "))))
|
||||
(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.
|
||||
|
||||
#+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
|
||||
|
||||
** Idris
|
||||
|
@ -4226,15 +4167,16 @@ 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.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(custom-set-faces!
|
||||
'((idris-operator-face idris-colon-face idris-equals-face) :slant normal)
|
||||
(after! idris-mode
|
||||
(custom-set-faces!
|
||||
'((idris-operator-face idris-colon-face idris-equals-face) :slant normal)
|
||||
|
||||
;; Semantic highlighting
|
||||
`(idris-semantic-type-face :foreground ,(doom-color 'blue))
|
||||
`(idris-semantic-data-face :foreground ,(doom-color 'red))
|
||||
`(idris-semantic-bound-face :foreground ,(doom-color 'magenta) :slant italic)
|
||||
`(idris-semantic-function-face :foreground ,(doom-color 'dark-green))
|
||||
`(idris-semantic-postulate-face :foreground ,(doom-color 'yellow)))
|
||||
;; Semantic highlighting
|
||||
`(idris-semantic-type-face :foreground ,(doom-color 'blue))
|
||||
`(idris-semantic-data-face :foreground ,(doom-color 'red))
|
||||
`(idris-semantic-bound-face :foreground ,(doom-color 'magenta) :slant italic)
|
||||
`(idris-semantic-function-face :foreground ,(doom-color 'dark-green))
|
||||
`(idris-semantic-postulate-face :foreground ,(doom-color 'yellow))))
|
||||
#+end_src
|
||||
|
||||
** Indentation
|
||||
|
@ -4257,7 +4199,6 @@ The =lsp-java= package provides LSP support using the standard Java language ser
|
|||
#+begin_src emacs-lisp
|
||||
(defun +lsp-java-server-store-path ()
|
||||
"Return the Nix store derivation path to the Java language server."
|
||||
(require 'lsp-java)
|
||||
(string-remove-suffix
|
||||
(concat "/bin/" lsp-java-jdt-ls-command)
|
||||
(or
|
||||
|
@ -4289,14 +4230,6 @@ Since I've started using [[https://github.com/elkowar/eww/tree/master?tab=readme
|
|||
(package! yuck-mode)
|
||||
#+end_src
|
||||
|
||||
** Slint
|
||||
|
||||
#+call: confpkg("Mode: Slint")
|
||||
|
||||
#+begin_src emacs-lisp :tangle packages.el
|
||||
(package! slint-mode)
|
||||
#+end_src
|
||||
|
||||
* Scratch :noexport:
|
||||
|
||||
#+call: confpkg()
|
||||
|
|
Loading…
Reference in a new issue