diff --git a/flake.lock b/flake.lock index e5a06c6..c0b0260 100644 --- a/flake.lock +++ b/flake.lock @@ -115,16 +115,17 @@ "base16-fish": { "flake": false, "locked": { - "lastModified": 1622559957, - "narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=", + "lastModified": 1754405784, + "narHash": "sha256-l9xHIy+85FN+bEo6yquq2IjD1rSg9fjfjpyGP1W8YXo=", "owner": "tomyun", "repo": "base16-fish", - "rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe", + "rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561", "type": "github" }, "original": { "owner": "tomyun", "repo": "base16-fish", + "rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561", "type": "github" } }, @@ -898,11 +899,11 @@ ] }, "locked": { - "lastModified": 1760005512, - "narHash": "sha256-xJ/pn6d9aYa9Eco+zjX7OoxSmaFf82q22u1Rjii9Bp0=", + "lastModified": 1760500983, + "narHash": "sha256-zfY4F4CpeUjTGgecIJZ+M7vFpwLc0Gm9epM/iMQd4w8=", "owner": "nix-community", "repo": "home-manager", - "rev": "685d8d85d051820164c809fbbc4c67474ee93d67", + "rev": "c53e65ec92f38d30e3c14f8d628ab55d462947aa", "type": "github" }, "original": { @@ -985,11 +986,11 @@ ] }, "locked": { - "lastModified": 1750621377, - "narHash": "sha256-8u6b5oAdX0rCuoR8wFenajBRmI+mzbpNig6hSCuWUzE=", + "lastModified": 1759490292, + "narHash": "sha256-T6iWzDOXp8Wv0KQOCTHpBcmAOdHJ6zc/l9xaztW6Ivc=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "b3d628d01693fb9bb0a6690cd4e7b80abda04310", + "rev": "9431db625cd9bb66ac55525479dce694101d6d7a", "type": "github" }, "original": { @@ -1016,11 +1017,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1759988134, - "narHash": "sha256-uVaAXjJgo2/uGJz6lD+Bn5nBBmW5AAr2n8lW7v7h0PI=", + "lastModified": 1760485027, + "narHash": "sha256-1VtVAyvi8wKZSCW+gmzkq6zb3rHlWndHDAPwqolL5+E=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "b965fb2a40b132209b58f511e2604a2939461818", + "rev": "60529e810d100231d17abab438f94460d4b9fc7e", "type": "github" }, "original": { @@ -1167,11 +1168,11 @@ ] }, "locked": { - "lastModified": 1750371198, - "narHash": "sha256-/iuJ1paQOBoSLqHflRNNGyroqfF/yvPNurxzcCT0cAE=", + "lastModified": 1758927902, + "narHash": "sha256-LZgMds7M94+vuMql2bERQ6LiFFdhgsEFezE4Vn+Ys3A=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "cee01452bca58d6cadb3224e21e370de8bc20f0b", + "rev": "4dafa28d4f79877d67a7d1a654cddccf8ebf15da", "type": "github" }, "original": { @@ -1192,11 +1193,11 @@ "systems": "systems_6" }, "locked": { - "lastModified": 1759572448, - "narHash": "sha256-o+r44fqPQM+/hQdjFy9qV9C51Jhty6M4icFVYocyJfA=", + "lastModified": 1760023949, + "narHash": "sha256-fu0B4duamVdbkPio/czu1XhsPLRXUJpZLDrSk3nih4U=", "owner": "hyprwm", "repo": "hyprlock", - "rev": "c8a6768dca626cf7d7cbc333095f048bc007b6d9", + "rev": "36ec73f166d9434a3f27c96c575198906f77644a", "type": "github" }, "original": { @@ -1242,11 +1243,11 @@ ] }, "locked": { - "lastModified": 1751061882, - "narHash": "sha256-g9n8Vrbx+2JYM170P9BbvGHN39Wlkr4U+V2WLHQsXL8=", + "lastModified": 1759619523, + "narHash": "sha256-r1ed7AR2ZEb2U8gy321/Xcp1ho2tzn+gG1te/Wxsj1A=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "4737241eaf8a1e51671a2a088518071f9a265cf4", + "rev": "3df7bde01efb3a3e8e678d1155f2aa3f19e177ef", "type": "github" }, "original": { @@ -1292,11 +1293,11 @@ ] }, "locked": { - "lastModified": 1750371869, - "narHash": "sha256-lGk4gLjgZQ/rndUkzmPYcgbHr8gKU5u71vyrjnwfpB4=", + "lastModified": 1755184602, + "narHash": "sha256-RCBQN8xuADB0LEgaKbfRqwm6CdyopE1xIEhNc67FAbw=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "aa38edd6e3e277ae6a97ea83a69261a5c3aab9fd", + "rev": "b3b0f1f40ae09d4447c20608e5a4faf8bf3c492d", "type": "github" }, "original": { @@ -1956,11 +1957,11 @@ "systems": "systems_9" }, "locked": { - "lastModified": 1759942631, - "narHash": "sha256-guXaJ4ktb5DW2RrtRhThX6PyH5A2wW+XTJ4Qu1AEXhA=", + "lastModified": 1760153667, + "narHash": "sha256-F7KmXT/Izse6Q6CkD5GCImoGPaDJxl03Kd7eD+eY/bU=", "owner": "notashelf", "repo": "nvf", - "rev": "314962bcb4d4da82c53ab343da1b09cffaa68c61", + "rev": "9df9d51fd9fc8f9a8fc377f984ea3b7ae796172d", "type": "github" }, "original": { @@ -2156,11 +2157,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1759690047, - "narHash": "sha256-Vlpa0d1xOgPO9waHwxJNi6LcD2PYqB3EjwLRtSxXlHc=", + "lastModified": 1760472212, + "narHash": "sha256-4C3I/ssFsq8EgaUmZP0xv5V7RV0oCHgL/Rx+MUkuE+E=", "owner": "danth", "repo": "stylix", - "rev": "09022804b2bcd217f3a41a644d26b23d30375d12", + "rev": "8d008296a1b3be9b57ad570f7acea00dd2fc92db", "type": "github" }, "original": { diff --git a/modules/linux/home-manager/configs/emacs/config.org b/modules/linux/home-manager/configs/emacs/config.org index 451aed5..14bda68 100644 --- a/modules/linux/home-manager/configs/emacs/config.org +++ b/modules/linux/home-manager/configs/emacs/config.org @@ -73,7 +73,7 @@ Move backup files to a diff directory. #+begin_src emacs-lisp (set-face-attribute 'default nil :font "CommitMono Nerd Font" - :height 130 + :height 140 :weight 'medium) (set-face-attribute 'variable-pitch nil :font "DejaVu Sans" @@ -81,10 +81,10 @@ Move backup files to a diff directory. :weight 'medium) (set-face-attribute 'fixed-pitch nil :font "CommitMono Nerd Font" - :height 130 + :height 140 :weight 'medium) -(add-to-list 'default-frame-alist '(font . "CommitMono Nerd Font-11")) +(add-to-list 'default-frame-alist '(font . "CommitMono Nerd Font-14")) #+end_src * ELECTRIC PAIR @@ -97,7 +97,9 @@ Move backup files to a diff directory. (if (char-equal c ?<) t (,electric-pair-inhibit-predicate c)))))) #+end_src -* EVIL MODE +* TRANSFORM INTO VIM + +** EVIL MODE #+begin_src emacs-lisp (use-package evil @@ -122,12 +124,73 @@ Move backup files to a diff directory. (evil-collection-init)) #+end_src +** MODELINE + +#+begin_src emacs-lisp +(use-package doom-modeline + :ensure t + :init (doom-modeline-mode 1) + :config + (setq doom-modeline-height 25 + doom-modeline-bar-width 5 + doom-modeline-persp-name t + doom-modeline-persp-icon t)) +#+end_src + +** VIM LIKE SCROLLING + +#+begin_src emacs-lisp +;; Vim like scrolling +(setq scroll-margin 10 + scroll-step 1 + scroll-conservatively 10000 + scroll-preserve-screen-position 1) +#+end_src + +* WHICH_KEY + +#+begin_src emacs-lisp +(use-package which-key + :init + (which-key-mode 1) + :diminish + :config + (setq which-key-side-window-location 'bottom + which-key-sort-order #'which-key-key-order-alpha + which-key-sort-uppercase-first nil + which-key-add-column-padding 1 + which-key-max-display-columns nil + which-key-min-display-lines 6 + which-key-side-window-slot -10 + which-key-side-window-max-height 0.25 + which-key-idle-delay 0.3 + which-key-max-description-length 25 + which-key-allow-imprecise-window-fit nil + which-key-separator " → " )) +#+end_src + * GENERAL KEYBINDINGS #+begin_src emacs-lisp (use-package general + :ensure t + :init + (with-eval-after-load 'evil + (general-evil-setup)) + (general-auto-unbind-keys) :config -) + (general-override-mode) + (general-create-definer +config/leader-key + :keymaps 'override + :states '(insert emacs normal hybrid motion visual operator) + :prefix "SPC" + :non-normal-prefix "s-SPC") + (general-create-definer +config/local-leader + :keymaps 'override + :states '(emacs normal hybrid motion visual operator) + :prefix "m" + :non-normal-prefix "s-m" + "" '(:ignore t :which-key (lambda (arg) `(,(cadr (split-string (car arg) " ")) . ,(replace-regexp-in-string "-mode$" "" (symbol-name major-mode))))))) #+end_src * DIMINISH @@ -230,3 +293,172 @@ Move backup files to a diff directory. ([remap describe-variable] . helpful-variable) ([remap describe-key] . helpful-key)) #+end_src + +* COMPLETION + +** VERTICO + +#+begin_src emacs-lisp +(use-package vertico + :bind (:map vertico-map + ("C-j" . vertico-next) + ("C-k" . vertico-previous) + ("C-l" . vertico-exit) + :map minibuffer-local-map + ("C-h" . backward-kill-word)) + :custom + (vertico-scroll-margin 0) ;; Different scroll margin + (vertico-count 15) ;; Show more candidates + (vertico-resize t) ;; Grow and shrink the Vertico minibuffer + (vertico-cycle t) ;; Enable cycling for `vertico-next/previous' + :init + (vertico-mode)) + +(use-package savehist + :ensure nil + :init + (savehist-mode)) + +(use-package emacs + :ensure nil + :custom + (context-menu-mode t) + (enable-recursive-minibuffers t) + (read-extended-command-predicate #'command-completion-default-include-p) + (minibuffer-prompt-properties + '(read-only t cursor-intangible t face minibuffer-prompt))) +#+end_src + +** MARGINALIA + +#+begin_src emacs-lisp +(use-package marginalia + :bind (:map minibuffer-local-map + ("M-A" . marginalia-cycle)) + :init + (marginalia-mode)) +#+end_src + +** CONSULT + +#+begin_src emacs-lisp +(use-package consult + :after vertico + :custom + (completion-in-region-function #'consult-completion-in-region) + :config + (recentf-mode t)) +#+end_src + +** ORDERLESS + +#+begin_src emacs-lisp +(use-package orderless + :ensure t + :custom + (completion-styles '(orderless basic)) + (completion-category-overrides '((file (styles partial-completion)))) + (completion-pcm-leading-wildcard t)) ;; Emacs 31: partial-completion behaves like substring +#+end_src + +* IN BUFFER COMPLETION + +** CORFU + +Adds in buffer completion for code/snippets + +#+begin_src emacs-lisp +(use-package corfu + ;; Optional customizations + :custom + (tab-always-indent 'complete) + (completion-cycle-threshold nil) + (corfu-cycle t) + (corfu-auto t) + (corfu-auto-prefix 2) + (corfu-auto-delay 0.1) + (corfu-min-width 60) + (corfu-popupinfo-delay '(0.5 . 0.2)) + (corfu-preview-current 'insert) + (corfu-preselect 'prompt) + (corfu-on-exact-match nil) + + :bind (:map corfu-map + ("C-j" . corfu-next) + ("C-k" . corfu-previous) + ("C-l" . corfu-insert)) + :init + (corfu-history-mode) + (corfu-popupinfo-mode) + (global-corfu-mode) + :config + (add-hook 'eshell-mode-hook + (lambda () (setq-local corfu-quit-at-boundary t + corfu-quit-no-match t + corfu-auto nil) + (corfu-mode)))) +#+end_src + +** KIND ICON + +Eyecandy for corfu + +#+begin_src emacs-lisp +(use-package kind-icon + :ensure t + :after corfu + :custom + (kind-icon-default-face 'corfu-default) + :config + (plist-put kind-icon-default-style :height 0.8) + (add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter)) +#+end_src + +** CAPE + +extending corpu + +#+begin_src emacs-lisp +(use-package cape + :defer 10 + :bind ("C-c f" . cape-file) + :init + (defalias 'dabbrev-after-2 (cape-capf-prefix-length #'cape-dabbrev 2)) + (add-to-list 'completion-at-point-functions 'dabbrev-after-2 t) + (cl-pushnew #'cape-file completion-at-point-functions) + :config + (advice-add 'pcomplete-completions-at-point :around #'cape-wrap-silent) + (advice-add 'pcomplete-completions-at-point :around #'cape-wrap-purify)) +#+end_src + +** YASNIPPET + +#+begin_src emacs-lisp +(use-package yasnippet + :ensure t + :init + (setq yas-nippet-dir "~/.config/emacs/snippets/") + (yas-global-mode)) +(use-package yasnippet-snippets + :ensure t + :after yasnippet) +#+end_src + +* DIRED + +#+begin_src emacs-lisp +(use-package dired-open + :config + (setq dired-open-extensions '(("mkv" . "mpv") + ("mp4" . "mpv")))) + +(use-package peep-dired + :after dired + :hook (evil-normalize-keymaps . peep-dired-hook) + :config + (evil-define-key 'normal dired-mode-map (kbd "h") 'dired-up-directory) + (evil-define-key 'normal dired-mode-map (kbd "l") 'dired-open-file) + (evil-define-key 'normal peep-dired-mode-map (kbd "j") 'peep-dired-next-file) + (evil-define-key 'normal peep-dired-mode-map (kbd "k") 'peep-dired-prev-file) +) +#+end_src