.
This commit is contained in:
parent
00e10b1eba
commit
5f94289d2e
3 changed files with 53 additions and 18 deletions
|
@ -81,6 +81,7 @@
|
||||||
wgrep
|
wgrep
|
||||||
which-key
|
which-key
|
||||||
xref-union
|
xref-union
|
||||||
|
zig-mode
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,9 @@
|
||||||
;; Description
|
;; Description
|
||||||
;;
|
;;
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
;;;; Requirements
|
||||||
|
;; Since I am using `cl-defun` in this init file, I need to require
|
||||||
|
;; `cl-macs`.
|
||||||
(require 'cl-macs)
|
(require 'cl-macs)
|
||||||
|
|
||||||
;;;; Early Variables
|
;;;; Early Variables
|
||||||
|
@ -32,6 +35,8 @@
|
||||||
;;;; Personal Information Setup
|
;;;; Personal Information Setup
|
||||||
(setq user-full-name "Daniel Ziltener"
|
(setq user-full-name "Daniel Ziltener"
|
||||||
user-mail-address "dziltener@lyrion.ch")
|
user-mail-address "dziltener@lyrion.ch")
|
||||||
|
|
||||||
|
;; I use `pass` as password storage.
|
||||||
(auth-source-pass-enable)
|
(auth-source-pass-enable)
|
||||||
|
|
||||||
;;;; Straight.el
|
;;;; Straight.el
|
||||||
|
@ -55,8 +60,13 @@
|
||||||
(use-package el-patch)
|
(use-package el-patch)
|
||||||
|
|
||||||
;;;; Helper Functions
|
;;;; Helper Functions
|
||||||
(cl-defun conditional-keybind (filter-fn target-fn
|
(cl-defun conditional-keybind
|
||||||
|
(filter-fn target-fn
|
||||||
&optional (fail-fn #'self-insert-command))
|
&optional (fail-fn #'self-insert-command))
|
||||||
|
"Creates a keybinding that checks `filter-fn`. If it succeeds,
|
||||||
|
`target-fn` is run, otherwise `fail-fn`. If no fail-fn is given,
|
||||||
|
`self-insert-command` is run instead.
|
||||||
|
`target-fn` and `fail-fn` must both be interactive."
|
||||||
(lambda (_prefix)
|
(lambda (_prefix)
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
(if (funcall filter-fn)
|
(if (funcall filter-fn)
|
||||||
|
@ -71,6 +81,7 @@
|
||||||
(display-time-mode t)
|
(display-time-mode t)
|
||||||
(enable-recursive-minibuffers t)
|
(enable-recursive-minibuffers t)
|
||||||
(enable-remote-dir-locals t)
|
(enable-remote-dir-locals t)
|
||||||
|
(fill-column 100)
|
||||||
(global-hl-line-mode t)
|
(global-hl-line-mode t)
|
||||||
(indent-tabs-mode nil)
|
(indent-tabs-mode nil)
|
||||||
(menu-bar-mode nil)
|
(menu-bar-mode nil)
|
||||||
|
@ -85,7 +96,8 @@
|
||||||
:hook
|
:hook
|
||||||
(minibuffer-setup . cursor-intangible-mode)
|
(minibuffer-setup . cursor-intangible-mode)
|
||||||
:config
|
:config
|
||||||
(advice-add 'risky-local-variable-p :override #'ignore))
|
(advice-add 'risky-local-variable-p :override #'ignore)
|
||||||
|
(global-display-fill-column-indicator-mode t))
|
||||||
|
|
||||||
;;;; Org Mode
|
;;;; Org Mode
|
||||||
(use-package org
|
(use-package org
|
||||||
|
@ -93,6 +105,7 @@
|
||||||
:hook
|
:hook
|
||||||
(org-mode . org-indent-mode)
|
(org-mode . org-indent-mode)
|
||||||
(org-src-mode . hack-local-variables)
|
(org-src-mode . hack-local-variables)
|
||||||
|
(org-mode . auto-fill-mode)
|
||||||
:config
|
:config
|
||||||
(setq org-directory "~/org")
|
(setq org-directory "~/org")
|
||||||
(add-to-list 'org-modules 'collector))
|
(add-to-list 'org-modules 'collector))
|
||||||
|
@ -165,7 +178,7 @@
|
||||||
:straight (:type git :host github :repo "lambda-emacs/lambda-line")
|
:straight (:type git :host github :repo "lambda-emacs/lambda-line")
|
||||||
:custom
|
:custom
|
||||||
(lambda-line-icon-time t) ;; requires ClockFace font (see below)
|
(lambda-line-icon-time t) ;; requires ClockFace font (see below)
|
||||||
(lambda-line-clockface-update-fontset "ClockFace") ;; set clock icon
|
(lambda-line-clockface-update-fontset "ClockFaceRect") ;; set clock icon
|
||||||
(lambda-line-position 'bottom) ;; Set position of status-line
|
(lambda-line-position 'bottom) ;; Set position of status-line
|
||||||
(lambda-line-abbrev t) ;; abbreviate major modes
|
(lambda-line-abbrev t) ;; abbreviate major modes
|
||||||
(lambda-line-hspace " ") ;; add some cushion
|
(lambda-line-hspace " ") ;; add some cushion
|
||||||
|
@ -174,14 +187,22 @@
|
||||||
(lambda-line-status-invert nil) ;; no invert colors
|
(lambda-line-status-invert nil) ;; no invert colors
|
||||||
(lambda-line-gui-ro-symbol " ⨂") ;; symbols
|
(lambda-line-gui-ro-symbol " ⨂") ;; symbols
|
||||||
(lambda-line-gui-mod-symbol " ⬤")
|
(lambda-line-gui-mod-symbol " ⬤")
|
||||||
(lambda-line-gui-rw-symbol " ◯")
|
(lambda-line-gui-rw-symbol " ")
|
||||||
|
(lambda-line-vc-symbol " ")
|
||||||
(lambda-line-space-top +.50) ;; padding on top and bottom of line
|
(lambda-line-space-top +.50) ;; padding on top and bottom of line
|
||||||
(lambda-line-space-bottom -.50)
|
(lambda-line-space-bottom -.50)
|
||||||
(lambda-line-symbol-position 0.1) ;; adjust the vertical placement of symbol
|
(lambda-line-symbol-position 0.1) ;; adjust the vertical placement of symbol
|
||||||
:config
|
:config
|
||||||
|
;; add evil indicator
|
||||||
|
(advice-add 'lambda-line-compose :around
|
||||||
|
(lambda (orig-fun status name primary tertiary secondary)
|
||||||
|
(funcall orig-fun
|
||||||
|
status
|
||||||
|
(concat name evil-mode-line-tag)
|
||||||
|
primary tertiary secondary)))
|
||||||
;; activate lambda-line
|
;; activate lambda-line
|
||||||
(lambda-line-mode)
|
(lambda-line-mode)
|
||||||
(lambda-line-clockface-update-fontset "ClockFace")
|
(lambda-line-clockface-update-fontset "ClockFaceRect")
|
||||||
(customize-set-variable 'flymake-mode-line-counter-format '("" flymake-mode-line-error-counter flymake-mode-line-warning-counter flymake-mode-line-note-counter ""))
|
(customize-set-variable 'flymake-mode-line-counter-format '("" flymake-mode-line-error-counter flymake-mode-line-warning-counter flymake-mode-line-note-counter ""))
|
||||||
(customize-set-variable 'flymake-mode-line-format '(" " flymake-mode-line-exception flymake-mode-line-counters))
|
(customize-set-variable 'flymake-mode-line-format '(" " flymake-mode-line-exception flymake-mode-line-counters))
|
||||||
;; set divider line in footer
|
;; set divider line in footer
|
||||||
|
@ -213,7 +234,13 @@
|
||||||
;; :after evil-leader
|
;; :after evil-leader
|
||||||
:ensure t
|
:ensure t
|
||||||
:init
|
:init
|
||||||
(setq evil-want-keybinding nil)
|
(setq evil-want-keybinding nil
|
||||||
|
evil-emacs-state-tag " "
|
||||||
|
evil-normal-state-tag " "
|
||||||
|
evil-visual-state-tag " "
|
||||||
|
evil-insert-state-tag " "
|
||||||
|
evil-motion-state-tag " "
|
||||||
|
evil-operator-state-tag " ")
|
||||||
:config
|
:config
|
||||||
(evil-set-leader 'normal (kbd "<SPC>"))
|
(evil-set-leader 'normal (kbd "<SPC>"))
|
||||||
(evil-set-leader 'normal (kbd "z") t)
|
(evil-set-leader 'normal (kbd "z") t)
|
||||||
|
@ -335,16 +362,14 @@
|
||||||
:config
|
:config
|
||||||
(add-to-list 'savehist-additional-variables 'corfu-history)
|
(add-to-list 'savehist-additional-variables 'corfu-history)
|
||||||
:hook
|
:hook
|
||||||
(global-corfu-mode . corfu-history-mode))
|
global-corfu-mode)
|
||||||
|
|
||||||
(use-package corfu-popupinfo
|
(use-package corfu-popupinfo
|
||||||
:after (corfu corfu-terminal)
|
:after corfu
|
||||||
:custom
|
:custom
|
||||||
(corfu-popupinfo-delay '(0.1 . 0.5))
|
(corfu-popupinfo-delay '(0.1 . 0.5))
|
||||||
:commands
|
:hook
|
||||||
corfu-popupinfo-mode
|
global-corfu-mode)
|
||||||
:init
|
|
||||||
(corfu-popupinfo-mode))
|
|
||||||
|
|
||||||
(use-package nerd-icons-corfu
|
(use-package nerd-icons-corfu
|
||||||
:after corfu
|
:after corfu
|
||||||
|
@ -354,10 +379,9 @@
|
||||||
(use-package corfu-terminal
|
(use-package corfu-terminal
|
||||||
:if (not (display-graphic-p))
|
:if (not (display-graphic-p))
|
||||||
:after corfu
|
:after corfu
|
||||||
:commands
|
:hook
|
||||||
corfu-terminal-mode
|
global-corfu-mode)
|
||||||
:init
|
|
||||||
(corfu-terminal-mode +1))
|
|
||||||
(use-package tempel)
|
(use-package tempel)
|
||||||
|
|
||||||
(use-package xref-union
|
(use-package xref-union
|
||||||
|
@ -377,6 +401,7 @@
|
||||||
(evil-snipe-scope 'whole-visible)
|
(evil-snipe-scope 'whole-visible)
|
||||||
(evil-snipe-repeat-scope 'whole-buffer)
|
(evil-snipe-repeat-scope 'whole-buffer)
|
||||||
(evil-snipe-spillover-scope 'whole-buffer)
|
(evil-snipe-spillover-scope 'whole-buffer)
|
||||||
|
(evil-snipe-tab-increment t)
|
||||||
:hook
|
:hook
|
||||||
evil-mode
|
evil-mode
|
||||||
(evil-mode . evil-snipe-override-mode)
|
(evil-mode . evil-snipe-override-mode)
|
||||||
|
@ -608,9 +633,15 @@ Point must be at the beginning of balanced expression (sexp)."
|
||||||
;; (add-hook 'flymake-diagnostic-functions #'flymake-chicken-backend nil t))
|
;; (add-hook 'flymake-diagnostic-functions #'flymake-chicken-backend nil t))
|
||||||
|
|
||||||
;;;; Other Languages
|
;;;; Other Languages
|
||||||
|
|
||||||
|
(use-package zig-mode
|
||||||
|
:hook
|
||||||
|
(zig-mode . eglot-ensure)
|
||||||
|
:mode ("\\.zig\\'" . zig-mode))
|
||||||
|
|
||||||
(use-package nix-mode
|
(use-package nix-mode
|
||||||
:hook
|
:hook
|
||||||
eglot-ensure
|
(nix-mode . eglot-ensure)
|
||||||
:mode ("\\.nix\\'" . nix-mode))
|
:mode ("\\.nix\\'" . nix-mode))
|
||||||
|
|
||||||
;; (use-package lsp-tailwindcss
|
;; (use-package lsp-tailwindcss
|
||||||
|
@ -664,6 +695,7 @@ Point must be at the beginning of balanced expression (sexp)."
|
||||||
:ensure t
|
:ensure t
|
||||||
:hook
|
:hook
|
||||||
(circe-chat-mode . enable-circe-color-nicks)
|
(circe-chat-mode . enable-circe-color-nicks)
|
||||||
|
(circe-chat-mode . auto-fill-mode)
|
||||||
:custom
|
:custom
|
||||||
(circe-network-options
|
(circe-network-options
|
||||||
'(("Lyrion Libera Chat"
|
'(("Lyrion Libera Chat"
|
||||||
|
|
2
home.nix
2
home.nix
|
@ -77,6 +77,8 @@ args@{ config, pkgs, hyprland, split-monitor-workspaces, flatpaks, ... }:
|
||||||
unzip
|
unzip
|
||||||
usbutils
|
usbutils
|
||||||
wlr-randr
|
wlr-randr
|
||||||
|
zig
|
||||||
|
zls
|
||||||
zoom-us
|
zoom-us
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue