summary refs log tree commit diff stats
path: root/user
diff options
context:
space:
mode:
Diffstat (limited to 'user')
-rw-r--r--user/emacs/init.el17
-rw-r--r--user/settings/emacs.nix18
-rw-r--r--user/settings/shell.nix2
3 files changed, 36 insertions, 1 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index 97c5e669..508541f6 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -139,6 +139,15 @@
 (setq-default display-line-numbers 'relative
               display-line-numbers-widen t
               display-line-numbers-width 4)
+
+(defun turn-off-display-line-numbers-mode ()
+  (interactive)
+  (display-line-numbers-mode -1))
+
+(defun turn-on-display-line-numbers-mode ()
+  (interactive)
+  (display-line-numbers-mode (default-value 'display-line-numbers)))
+
 (setq frame-resize-pixelwise t
       window-resize-pixelwise t
       display-buffer-alist `(("\\*\\(?:shell\\|compilation\\)\\*" display-buffer-in-side-window
@@ -158,6 +167,13 @@
 (add-hook 'evil-insert-state-entry-hook #'noct-absolute)
 (add-hook 'evil-insert-state-exit-hook #'noct-relative)
 
+(use-package ultra-scroll
+  :defer 1
+  :config (progn
+            (setq scroll-margin 0
+                  scroll-conservatively 101)
+            (ultra-scroll-mode +1)))
+
 ;;; Encoding
 
 (setq-default bidi-paragraph-direction 'left-to-right
@@ -736,6 +752,7 @@ _C-k_: prev  _u_pper              _=_: upper/lower       _s_mart resolve
   :defer 5
   :commands (eshell)
   :functions (eshell/pwd)
+  :gfhook #'turn-off-display-line-numbers-mode
   :general (:keymaps 'eshell-command-map
                      "C-r" #'eshell-history-backwards
                      "C-s" #'eshell-history-forwards)
diff --git a/user/settings/emacs.nix b/user/settings/emacs.nix
index e6114e2a..b5470c96 100644
--- a/user/settings/emacs.nix
+++ b/user/settings/emacs.nix
@@ -159,6 +159,7 @@ in
         treesit-grammars.with-all-grammars
         treesit-auto
         try
+        ultra-scroll
         vc-msg
         vertico
         vertico-prescient
@@ -169,6 +170,23 @@ in
         yasnippet-capf
       ]);
     overrides = self: super: {
+      ultra-scroll = self.melpaBuild rec {
+        pname = "ultra-scroll";
+        version = "0.3.1";
+
+        src = pkgs.fetchFromGitHub {
+          owner = "jdtsmith";
+          repo = pname;
+          rev = "2e3b9997ae1a469e878feaa0af23a23685a0fbed";
+          hash = "sha256-9+3T5tXPRuRtENt/Rr0Ss3LZJlTOwpGePbREqofN2j0=";
+        };
+
+        meta = {
+          homepage = "https://github.com/jdtsmith/ultra-scroll";
+          description = "scroll emacs like lightning";
+          license = pkgs.lib.licenses.gpl3;
+        };
+      };
       apheleia = self.melpaPackages.apheleia.overrideAttrs
         (old: {
           patchPhase = ''
diff --git a/user/settings/shell.nix b/user/settings/shell.nix
index cbf3f96f..41805a44 100644
--- a/user/settings/shell.nix
+++ b/user/settings/shell.nix
@@ -113,7 +113,7 @@ in
       ho = "home-manager";
       hob = "home-manager build";
       hos = "home-manager switch --flake '.?submodules=1' -b hm_bak_$(date +%Y%m%d%H%M)";
-      hon = "home-manager news";
+      hon = "home-manager news --flake '.?submodules=1'";
       hoh = "home-manager help";
       hop = "home-manager packages";
       hol = "home-manager generations";