Compare commits

...
2 Commits
Author SHA1 Message Date
jasonhilder d2e47dec2a Emacs omg. 2026-10-26 08:26:57 +02:00
jasonhilder d2de783f3b Updated ignore files. 2026-10-26 08:26:45 +02:00
2 changed files with 13 additions and 23 deletions
+3
View File
@@ -16,3 +16,6 @@ config/vim/.netrwhist
config/nvim/nvim-pack-lock.json config/nvim/nvim-pack-lock.json
# other # other
scripts/bin/ols scripts/bin/ols
scripts/bin/deno
scripts/bin/yt-dlp
scripts/bin/tiled
+10 -23
View File
@@ -1,8 +1,7 @@
;;; init.el --- Minimal Emacs: built-ins + evil + consult -*- lexical-binding: t; -*- ;;; init.el --- Minimal Emacs: built-ins + evil + consult -*- lexical-binding: t; -*-
;; Learning: F1 k KEY, F1 f FUNCTION, F1 v VARIABLE, ;; Learning: F1 k KEY, F1 f FUNCTION, F1 v VARIABLE, F1 m (modes), F1 b (bindings).
;; F1 m (modes), F1 b (bindings). ;; C-h works too, except in normal/motion state where it moves to the window on the left.
;; C-h works too, except in normal/motion state where it moves
;; to the window on the left.
;;; Code: ;;; Code:
;;;; 1. Emac setup, files, packages and paths ;;;; 1. Emac setup, files, packages and paths
(dolist (bin (list (expand-file-name "~/.local/bin") (dolist (bin (list (expand-file-name "~/.local/bin")
@@ -46,14 +45,12 @@
(blink-cursor-mode -1) (blink-cursor-mode -1)
(setq inhibit-startup-screen t (setq inhibit-startup-screen t
initial-scratch-message nil
ring-bell-function #'ignore ring-bell-function #'ignore
use-short-answers t use-short-answers t
scroll-conservatively 101 scroll-conservatively 101
scroll-margin 15) scroll-margin 20)
(setq-default indent-tabs-mode nil (setq-default indent-tabs-mode nil tab-width 4)
tab-width 4)
(global-hl-line-mode 1) (global-hl-line-mode 1)
(global-display-line-numbers-mode 1) (global-display-line-numbers-mode 1)
@@ -64,7 +61,7 @@
(add-to-list 'warning-suppress-types '(files)) (add-to-list 'warning-suppress-types '(files))
(use-package doom-themes :ensure t) (use-package doom-themes :ensure t)
(load-theme 'doom-one t) (load-theme 'doom-tomorrow-night t)
(doom-themes-set-faces 'user (doom-themes-set-faces 'user
'(default :background "#131313") '(default :background "#131313")
'(fringe :background "#131313") '(fringe :background "#131313")
@@ -139,16 +136,12 @@
(setq evil-want-C-u-scroll t (setq evil-want-C-u-scroll t
evil-undo-system 'undo-redo evil-undo-system 'undo-redo
evil-want-keybinding nil) evil-want-keybinding nil)
:config :config
(evil-mode 1) (evil-mode 1)
(evil-define-key 'insert 'global (evil-define-key 'insert 'global
(kbd "TAB") #'my/insert-tab (kbd "TAB") #'my/insert-tab
(kbd "<tab>") #'my/insert-tab (kbd "C-SPC") #'completion-at-point)
;; complete using the buffer's completion sources.
(kbd "C-SPC") #'completion-at-point
(kbd "C-@") #'completion-at-point)
;; C-p, C-f and C-b are assigned to Consult below. ;; C-p, C-f and C-b are assigned to Consult below.
(evil-define-key '(normal motion) 'global (evil-define-key '(normal motion) 'global
@@ -173,14 +166,6 @@
(evil-define-key '(insert normal) minibuffer-local-map (evil-define-key '(insert normal) minibuffer-local-map
(kbd "<escape>") #'abort-minibuffers) (kbd "<escape>") #'abort-minibuffers)
;; Window navigation (normal/motion state): Ctrl+hjkl move, Ctrl+` closes.
(evil-define-key '(normal motion) 'global
(kbd "C-h") #'windmove-left
(kbd "C-j") #'windmove-down
(kbd "C-k") #'windmove-up
(kbd "C-l") #'windmove-right
(kbd "C-q") #'delete-window)
;; Result buffers: hjkl motions and RET to jump to a result. ;; Result buffers: hjkl motions and RET to jump to a result.
(dolist (m '(occur-mode grep-mode xref--xref-buffer-mode)) (dolist (m '(occur-mode grep-mode xref--xref-buffer-mode))
(evil-set-initial-state m 'motion)) (evil-set-initial-state m 'motion))
@@ -222,7 +207,7 @@
(evil-define-key '(normal motion) 'global (evil-define-key '(normal motion) 'global
(kbd "C-p") #'consult-fd (kbd "C-p") #'consult-fd
(kbd "C-f") #'consult-ripgrep (kbd "C-f") #'consult-ripgrep
(kbd "C-b") #'consult-buffer) (kbd "C-m") #'consult-buffer)
;;;; 7. Dired ;;;; 7. Dired
(setq dired-dwim-target t (setq dired-dwim-target t
@@ -243,6 +228,8 @@
"." #'dired-omit-mode "." #'dired-omit-mode
(kbd "RET") #'dired-find-file)) (kbd "RET") #'dired-find-file))
;;;; Core config ends here.
;;;; -----------------------------------------------------------------
;;;; 8. Modules - additional functionality outside of the core init.el ;;;; 8. Modules - additional functionality outside of the core init.el
;; Setup for orgmode ;; Setup for orgmode
(load (locate-user-emacs-file "modules/org.el") nil 'nomessage) (load (locate-user-emacs-file "modules/org.el") nil 'nomessage)