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