Compare commits

...

16 commits
devil ... main

Author SHA1 Message Date
eriedaberrie 5d969593c7 Fix font size of current line number when zooming in or out 2024-09-27 11:58:27 -07:00
eriedaberrie 9e02bf9640 Stop indenting in org-mode 2024-09-09 15:24:04 -07:00
eriedaberrie c286cde1b4 Fill-column: 80 -> 78 2024-09-06 15:29:22 -07:00
eriedaberrie 199052c31d Ensure eglot on Python buffers 2024-07-11 23:31:00 -07:00
eriedaberrie 96ab2661e1 Increase font size from 10.5 to 11
I need glasses
2024-05-09 14:26:01 -07:00
eriedaberrie de0dc1f729 Switch to upstream emacs-everywhere from personal Hyprland fork
Because upstream has been updated and is customizable enough to support Hyprland
relatively easily without needing a fork now.
2024-04-30 23:09:38 -07:00
eriedaberrie db0995ea1f Make battery checker check more standardized values 2024-04-23 00:43:11 -07:00
eriedaberrie 89abc90a68 Add eglot-booster 2024-04-11 09:48:12 -07:00
eriedaberrie 652f639894 Guix is just not happening 2024-01-25 23:10:51 -08:00
eriedaberrie 764d6e0724 Hook rust-ts-mode to eglot-ensure 2024-01-25 23:10:25 -08:00
eriedaberrie 7b191e0d04 Make haskell-mode support interactive by default 2024-01-14 22:22:41 -08:00
eriedaberrie ad563d4031 Replace spell-fu with jinx 2024-01-14 22:22:01 -08:00
eriedaberrie d0e5e85867 Use more default ace-window
I am no longer using evil/meow so the default keys make more sense I guess
2023-12-14 17:32:40 -08:00
eriedaberrie 566ae9da48 Actually enable word count in doom modeline 2023-12-05 02:22:37 -08:00
eriedaberrie 5ca9de898c Switch god-mode C-M- mapping to `m' 2023-11-20 13:14:48 -08:00
eriedaberrie 34d6ee874d Map .epub files to nov-mode 2023-11-15 21:39:01 -08:00
2 changed files with 59 additions and 73 deletions

View file

@ -15,7 +15,7 @@
(k-time (garbage-collect))))))
;; Set frame parameters early
(setq default-frame-alist '((font . "JetbrainsMono Nerd Font-10.5")
(setq default-frame-alist '((font . "JetbrainsMono Nerd Font-11")
(tool-bar-lines . 0)
(menu-bar-lines . 0)
(vertical-scroll-bars . nil)))

130
init.el
View file

@ -73,6 +73,9 @@
(god-exempt-major-modes nil)
(god-exempt-predicates (list #'god-exempt-mode-p))
(god-mode-enable-function-key-translations nil)
(god-mode-alist '((nil . "C-")
("g" . "M-")
("m" . "C-M-")))
:config
(defun my--god-c-q ()
(interactive)
@ -106,7 +109,7 @@
:bind
("C-S-c" . mc/edit-lines)
("C->" . mc/mark-next-like-this)
("C-<" . mc/mark-prev-like-this)
("C-<" . mc/mark-previous-like-this)
("C-+" . mc/mark-all-like-this)
("C-|" . mc/mark-pop)
("C-c c" . mc/mark-all-in-region)
@ -158,15 +161,10 @@
(use-package ace-window
:bind ("C-c w" . ace-window)
:custom
(aw-keys '(?a ?w ?e ?r ?g ?h ?j ?k ?l ?p))
(aw-dispatch-always t)
(aw-scope 'frame)
(aw-keys '(?a ?w ?d ?f ?g ?h ?k ?l))
:config
(dolist (c aw-dispatch-alist)
(cl-case (car c)
(?j (setcar c ?J))
(?v (setcar c ?s) (setcar (nthcdr 2 c) "Split Window"))
(?b (setcar c ?v) (setcar (nthcdr 2 c) "Vertical Split"))))
(with-eval-after-load 'catppuccin-theme
(face-spec-set 'aw-leading-char-face `((t (:foreground
,(catppuccin-get-color 'crust)
@ -277,13 +275,16 @@
(c-ts-mode . eglot-ensure)
(c++-mode . eglot-ensure)
(c++-ts-mode . eglot-ensure)
(haskell-mode . eglot-ensure)
(java-mode . eglot-ensure)
(java-ts-mode . eglot-ensure)
(haskell-mode . eglot-ensure)
(lua-mode . eglot-ensure)
(nix-mode . eglot-ensure)
(js-mode . eglot-ensure)
(js-ts-mode . eglot-ensure)
(lua-mode . eglot-ensure)
(nix-mode . eglot-ensure)
(python-mode . eglot-ensure)
(python-ts-mode . eglot-ensure)
(rust-ts-mode . eglot-ensure)
(typescript-ts-mode . eglot-ensure)
(tsx-ts-mode . eglot-ensure)
:custom
@ -295,6 +296,15 @@
'((haskell
(formattingProvider . "floskell")))))
(use-package eglot-booster
:ensure nil
:after eglot
:demand t
:custom
(eglot-booster-no-remote-boost t)
:config
(eglot-booster-mode))
(use-package eglot-java
:hook java-mode java-ts-mode)
@ -338,8 +348,8 @@
(completion-category-overrides '((file (styles basic partial-completion)))))
(use-package marginalia
:demand t
:after vertico
:demand t
:bind (:map minibuffer-local-map ("M-a" . marginalia-cycle))
:config
(marginalia-mode))
@ -381,8 +391,8 @@
(use-package treemacs)
(use-package treemacs-all-the-icons
:demand t
:after treemacs
:demand t
:config
(treemacs-load-theme 'all-the-icons))
@ -390,6 +400,7 @@
:demand t
:custom
(doom-modeline-continuous-word-count-modes '(markdown-mode gfm-mode org-mode))
(doom-modeline-enable-word-count t)
(doom-modeline-indent-info t)
(doom-modeline-minor-modes t)
(doom-modeline-battery nil)
@ -402,8 +413,8 @@
(minions-mode))
(use-package dirvish
:demand t
:after dired
:demand t
:custom
(dired-auto-revert-buffer t)
(dirvish-attributes '(all-the-icons))
@ -459,7 +470,6 @@
(org-mode . my-inhibit-hl-line-mode)
(org-mode . my-double-space-sentence)
:custom
(org-startup-indented t)
(org-startup-with-inline-images t)
(org-special-ctrl-a/e t)
(org-insert-heading-respect-content t)
@ -525,7 +535,9 @@
:hook org-modern-mode)
(use-package djvu)
(use-package nov)
(use-package nov
:mode ("\\.epub\\'" . nov-mode))
(use-package org-pdftools
:hook (org-mode . org-pdftools-setup-link))
@ -569,6 +581,7 @@
:hook (racket-mode . racket-xp-mode))
(use-package haskell-mode
:hook (haskell-mode . interactive-haskell-mode)
:custom
(haskell-process-show-debug-tips nil))
@ -589,57 +602,16 @@
(use-package meson-mode)
(use-package spell-fu
:hook
text-mode
(org-mode . (lambda ()
(setq spell-fu-faces-exclude
'(org-block-begin-line
org-block-end-line
org-code
org-date
org-drawer org-document-info-keyword
org-ellipsis
org-link
org-meta-line
org-properties
org-properties-value
org-special-keyword
org-src
org-tag
org-verbatim)))))
(use-package jinx
:hook text-mode)
(use-package minimap
:custom-face
(minimap-active-region-background ((t (:background unspecified :inherit hl-line))))
:hook (minimap-sb-mode . turn-on-solaire-mode))
(defun my-magit-spell-fu-check-range (pos-beg pos-end)
(spell-fu--overlays-remove pos-beg pos-end)
(with-syntax-table spell-fu-syntax-table
(save-match-data
(save-excursion
(goto-char (point-min))
(let ((check-end (-> (format "^%s -+ >8 -+$" comment-start)
(re-search-forward pos-end t)
(or pos-end)))
(comment-start-char (aref comment-start 0)))
(goto-char pos-beg)
(while (< (point) check-end)
(unless (= (char-after) comment-start-char)
(let ((pos-line-end (pos-eol)))
(while (re-search-forward spell-fu-word-regexp pos-line-end t)
(let ((word-beg (match-beginning 0))
(word-end (match-end 0)))
(spell-fu-check-word word-beg word-end (match-string-no-properties 0))))))
(forward-line)))))))
(use-package magit
:hook (git-commit-setup . (lambda ()
(git-commit-turn-on-auto-fill)
(spell-fu-mode)
(setq-local spell-fu-check-range #'my-magit-spell-fu-check-range)
(spell-fu--time-ensure t))))
:hook (git-commit-setup . git-commit-turn-on-auto-fill))
(use-package forge
:after magit
@ -689,7 +661,7 @@
:sasl-password ,(if (functionp secret)
(funcall secret)
secret)
:channels ("#guix" "#nonguix" "#emacs" "#nixos"))))))
:channels ("#emacs" "#nixos" "#lisp" "#commonlisp"))))))
(add-hook 'lui-mode-hook
(lambda ()
(visual-line-mode)
@ -735,7 +707,7 @@
(use-package catppuccin-theme
:demand t
:custom-face
(line-number-current-line ((t (:inherit hl-line))))
(line-number-current-line ((t (:inherit (hl-line default)))))
:custom
(catppuccin-flavor 'mocha)
(catppuccin-highlight-matches t)
@ -860,15 +832,29 @@
(org-msg-greeting-fmt "\nHi%s,\n\n"))
(use-package emacs-everywhere
:ensure nil
:commands emacs-everywhere
:custom
(emacs-everywhere-frame-parameters '((name . "emacs-everywhere")
(alpha-background . 1.0)))
(emacs-everywhere-app-info-function
(lambda ()
(let* ((string-data (emacs-everywhere-call "hyprctl" "-j" "activewindow"))
(window-data (json-parse-string string-data
:object-type 'plist
:array-type 'list
:null-object nil
:false-object nil))
(window-id (plist-get window-data :address))
(app-id (plist-get window-data :class))
(window-title (plist-get window-data :title))
(window-geometry (append (plist-get window-data :at)
(plist-get window-data :size))))
(make-emacs-everywhere-app
:id window-id
:class app-id
:title window-title
:geometry window-geometry))))
(emacs-everywhere-window-focus-command '("hyprctl" "dispatch" "focuswindow" "address:%w"))
:config
(setq emacs-everywhere-frame-parameters
(append '((alpha-background . 1.0) (width . 120) (height . 20))
emacs-everywhere-frame-parameters)))
(dolist (f '((alpha-background . 1.0) (width . 120) (height . 20)))
(add-to-list 'emacs-everywhere-frame-parameters f)))
(use-package prettify-symbols
:ensure nil
@ -939,7 +925,7 @@
json-ts-mode-indent-offset 4
sgml-basic-offset 4
tab-width 4
fill-column 80)
fill-column 78)
;; Because python-mode sets tab-width to 8 for some reason
(add-hook 'python-mode-hook (lambda () (setq tab-width 4)))
@ -1008,15 +994,15 @@
(cd "~/")))
(defvar my-ac-previous-status t
"Whether battery was not in use on last check.")
"Whether connected to AC during last check.")
(require 'battery)
(defun my-bat-check ()
"Check if battery status has changed.
Used to toggle `goggles-pulse', `pixel-scroll-precision-mode', and `nyan-mode'."
(let ((ac-status (not (string=
(cdr (assq ?L (funcall battery-status-function)))
"BAT"))))
(cdr (assq ?B (funcall battery-status-function)))
"discharging"))))
(unless (eq ac-status my-ac-previous-status)
(setq my-ac-previous-status ac-status)
(when (boundp 'goggles-pulse)