Compare commits
12 commits
f2b5942f7d
...
cbc038eb1d
Author | SHA1 | Date | |
---|---|---|---|
Kiana Sheibani | cbc038eb1d | ||
Kiana Sheibani | 0720e4e6c4 | ||
Kiana Sheibani | 292394acbf | ||
Kiana Sheibani | e41ad9bbca | ||
Kiana Sheibani | a193fe28e6 | ||
Kiana Sheibani | 30a4e0d322 | ||
Kiana Sheibani | 24f5fccd34 | ||
Kiana Sheibani | 5345309958 | ||
Kiana Sheibani | 2a5c3e6ba1 | ||
Kiana Sheibani | 83f3bfd0d1 | ||
Kiana Sheibani | a02587b2d4 | ||
Kiana Sheibani | 1445e74457 |
13
.gitignore
vendored
13
.gitignore
vendored
|
@ -1,14 +1,5 @@
|
||||||
config.*
|
*.el
|
||||||
!config.org
|
!.dir-locals.el
|
||||||
init.el
|
|
||||||
packages.el
|
|
||||||
cli.el
|
|
||||||
|
|
||||||
subconf/
|
|
||||||
modules/
|
|
||||||
|
|
||||||
_minted-config
|
_minted-config
|
||||||
abbrev.el
|
|
||||||
|
|
||||||
!.dir-locals.el
|
|
||||||
~*
|
~*
|
||||||
|
|
115
config.org
115
config.org
|
@ -775,12 +775,9 @@ 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:
|
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:
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defmacro defpatch! (feature type-name &rest args)
|
(defmacro defpatch! (feature type-name &rest args)
|
||||||
|
@ -805,6 +802,9 @@ 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)
|
frame nil 'nomini)
|
||||||
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,8 +2097,7 @@ 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
|
||||||
(after! flymake
|
(set-popup-rule! "^\\*Flymake" :vslot 1 :side 'bottom)
|
||||||
(set-popup-rule! "^\\*Flymake" :vslot 1 :side 'bottom))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Git
|
** Git
|
||||||
|
@ -2376,6 +2375,17 @@ 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")
|
||||||
|
@ -2717,9 +2727,10 @@ 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
|
|
||||||
(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
|
#+end_src
|
||||||
|
|
||||||
*** Tweaks
|
*** Tweaks
|
||||||
|
@ -2947,10 +2958,15 @@ 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
|
||||||
(pushnew! org-entities-user
|
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
|
||||||
|
@ -4031,7 +4047,18 @@ 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
|
||||||
|
|
||||||
*** Appearance
|
*** 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
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(after! dirvish
|
(after! dirvish
|
||||||
|
@ -4039,10 +4066,43 @@ The variable ~+workspaces-switch-project-function~ contains a function that is r
|
||||||
(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
|
||||||
|
|
||||||
;; Set dirvish line highlight to something less blinding
|
*** 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-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
|
||||||
|
@ -4053,8 +4113,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-arguments], prompt for PATH, otherwise
|
If called with \\[universal-argument], 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)
|
||||||
|
@ -4092,8 +4152,7 @@ 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
|
||||||
(after! haskell-mode
|
(custom-set-faces! '(haskell-operator-face :slant normal))
|
||||||
(custom-set-faces! '(haskell-operator-face :slant normal)))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Idris
|
** Idris
|
||||||
|
@ -4167,8 +4226,7 @@ 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
|
||||||
(after! idris-mode
|
(custom-set-faces!
|
||||||
(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
|
||||||
|
@ -4176,7 +4234,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
|
||||||
|
@ -4199,6 +4257,7 @@ 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
|
||||||
|
@ -4230,6 +4289,14 @@ 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