diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 396ad8f44..df1ee6c48 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -154,6 +154,7 @@ modules/ui/nav-flash @doomemacs/ui-nav-flash modules/ui/neotree @doomemacs/ui-neotree modules/ui/ophints @doomemacs/ui-ophints modules/ui/popup @doomemacs/ui-popup +modules/ui/smooth-scroll @doomemacs/ui-smooth-scroll modules/ui/tabs @doomemacs/ui-tabs modules/ui/treemacs @doomemacs/ui-treemacs modules/ui/unicode @doomemacs/ui-unicode diff --git a/modules/ui/smooth-scroll/README.org b/modules/ui/smooth-scroll/README.org new file mode 100644 index 000000000..e43525922 --- /dev/null +++ b/modules/ui/smooth-scroll/README.org @@ -0,0 +1,72 @@ +#+title: :ui smooth-scroll +#+subtitle: So smooth you won't believe it's not butter +#+created: April 1, 2025 +#+since: 25.05.0 + +* Description :unfold: +This module activates OS-independent smooth scrolling in Emacs. This primarily +benefits trackpad and scroll wheel users (not so much those that scroll via +their keyboards), by utilizing the [[https://github.com/jdtsmith/ultra-scroll][ultra-scroll]] package. + +#+begin_quote +  For optimal performance from this module, it's highly recommended you use + Emacs with native-compilation. MacOS users may also have a better experience + using the [[https://bitbucket.org/mituharu/emacs-mac][emacs-mac]] fork of Emacs, available via Homebrew. +#+end_quote + +** Maintainers +- [[doom-user:][@hlissner]] + +[[doom-contrib-maintainer:][Become a maintainer?]] + +** Module flags +/This module has no flags./ + +** Packages +- [[doom-package:ultra-scroll]] + +** Hacks +/No hacks documented for this module./ + +** TODO Changelog +# This section will be machine generated. Don't edit it by hand. +/This module does not have a changelog yet./ + +* Installation +[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]] + +/This module has no external requirements./ + +* Usage +This module only needs to be activated to experience its benefits. + +* TODO Configuration +#+begin_quote + 󱌣 This module has no configuration documentation yet. [[doom-contrib-module:][Write some?]] +#+end_quote + +* Troubleshooting +This module should work on any platform that provides pixel-level scrolling +information from your input hardware, but if you run into issues, here are some +things to try: + +- Use ~M-x ultra-scroll-check~ to diagnose common issues. Visit [[https://github.com/jdtsmith/ultra-scroll?tab=readme-ov-file#compatibility][ultra-scroll's + documentation]] for more on interpreting and acting on its results. +- Read ultra-scroll's documentation on [[https://github.com/jdtsmith/ultra-scroll?tab=readme-ov-file#Speed][scrolling speed]]; it outlines common + factors that may impact it and how to mitigate them. +- See Doom's "[[https://discourse.doomemacs.org/t/why-is-emacs-doom-slow/83/3][Why is Emacs/Doom slow?]]" write-up, where Doom's author documents + common factors that can slow Emacs down in general (not specifically to do + with scrolling) and what to do about them. + +If all else fails, let us know on [[https://discourse.doomemacs.org][Discourse]] or [[https://doomemacs.org/discord][Discord]]. Only file an issue if +you have a good idea what's causing the problem or have an explicit error to +report (performance issues, in general, tend to be the result of *many* factors +and are the greatest source of false positives on our issue tracker). + +* Frequently asked questions +/This module has no FAQs yet./ [[doom-suggest-faq:][Ask one?]] + +* TODO Appendix +#+begin_quote + 󱌣 This module has no appendix yet. [[doom-contrib-module:][Write one?]] +#+end_quote diff --git a/modules/ui/smooth-scroll/config.el b/modules/ui/smooth-scroll/config.el new file mode 100644 index 000000000..8d94f6344 --- /dev/null +++ b/modules/ui/smooth-scroll/config.el @@ -0,0 +1,8 @@ +;;; ui/smooth-scroll/config.el -*- lexical-binding: t; -*- + +(use-package! ultra-scroll + :hook (doom-first-input . ultra-scroll-mode) + :hook (doom-first-file . ultra-scroll-mode) + :init + (setq scroll-conservatively 101 + scroll-margin 0)) diff --git a/modules/ui/smooth-scroll/packages.el b/modules/ui/smooth-scroll/packages.el new file mode 100644 index 000000000..555704961 --- /dev/null +++ b/modules/ui/smooth-scroll/packages.el @@ -0,0 +1,6 @@ +;; -*- no-byte-compile: t; -*- +;;; ui/smooth-scroll/packages.el + +(package! ultra-scroll + :recipe (:host github :repo "jdtsmith/ultra-scroll") + :pin "b72c507f6702db18d971a6b6bdc692e260f21159") diff --git a/static/init.example.el b/static/init.example.el index 187cd99be..e0e9da039 100644 --- a/static/init.example.el +++ b/static/init.example.el @@ -43,6 +43,7 @@ ;;neotree ; a project drawer, like NERDTree for vim ophints ; highlight the region an operation acts on (popup +defaults) ; tame sudden yet inevitable temporary windows + ;;smooth-scroll ; So smooth you won't believe it's not butter ;;tabs ; a tab bar for Emacs ;;treemacs ; a project drawer, like neotree but cooler ;;unicode ; extended unicode support for various languages