Commit graph

22 commits

Author SHA1 Message Date
Henrik Lissner
febeed2526
ui/nav-flash: blink on window switch conditionally
The alternative is too aggressive.
2019-05-22 17:11:24 -04:00
Henrik Lissner
9f45197a0b
ui/nav-flash: improve conditional blinking on jump
Sometimes it wouldn't blink when the motion occurred within the same
window. This ensures more consistency.
2019-05-21 17:24:23 -04:00
Henrik Lissner
0e2cbdf8f5
ui/nav-flash: trigger on switch-window 2019-05-21 03:42:12 -04:00
Henrik Lissner
0041723a80
Make +nav-flash/blink-cursor unconditional
Since it is meant for interactive use
2019-05-21 01:24:55 -04:00
Henrik Lissner
dba3ae5e4d
Prevent nav-flash from firing too often
And trigger on better-jumper-post-jump-hook instead, so that non-evil
users can benefit from nav-flash in this case too.
2019-05-19 02:17:58 -04:00
Henrik Lissner
8399143901
ui/nav-flash: update README 2019-04-24 18:16:05 -04:00
Henrik Lissner
77e4cc4d58
💥 Remove :feature category
:feature was a "catch-all" category. Many of its modules fit better in
other categories, so they've been moved:

- feature/debugger -> tools/debugger
- feature/evil -> editor/evil
- feature/eval -> tools/eval
- feature/lookup -> tools/lookup
- feature/snippets -> editor/snippets
- feature/file-templates -> editor/file-templates
- feature/workspaces -> ui/workspaces

More potential changes in the future:

- A new :term category for terminal emulation modules (eshell, term and
  vterm).
- A new :os category for modules dedicated to os-specific functionality.
  The :tools macos module would fit here, but so would modules for nixos
  and arch.
- A new :services category for web-service integration, like wakatime,
  twitter, elfeed, gist and pastebin services.
2019-04-24 18:16:04 -04:00
Henrik Lissner
a05b1877be
Rewrite switch-{buffer,window} hooks
+ Add doom-switch-frame-hook
+ Replace doom-{enter,exit}-{buffer,window}-hook with
  doom-switch-{buffer,window}-hook
+ New switch-buffer hooks run on buffer-list-update-hook rather than
  in select-window advice.
+ Blank our buffer-list-update-hook in some places to reduce how many
  times it gets triggered.
2019-03-08 02:37:33 -05:00
Henrik Lissner
f58f3c3604
ui/nav-flash: refactor
+ Add +nav-flash-exclude-commands to control where
  +nav-flash-blink-cursor-maybe should not trigger nav-flash.
+ Rename API to conform to Doom naming conventions
  + +nav-flash-blink-cursor
  + +nav-flash-blink-cursor-maybe
  + +nav-flash|delayed-blink-cursor
  + +nav-flash|blink-cursor
  + +nav-flash|blink-cursor-maybe
  + +nav-flash*blink-cursor
2018-07-24 20:04:03 +02:00
Henrik Lissner
b5c57ab6e4
Don't trigger nav-flash in special windows 2018-07-10 23:05:39 +02:00
Henrik Lissner
81ffed520b
Rename doom-before-switch-*-hook hooks
+ doom-before-switch-buffer-hook => doom-exit-buffer-hook
+ doom-before-switch-window-hook => doom-exit-window-hook
+ doom-after-switch-buffer-hook => doom-enter-buffer-hook
+ doom-after-switch-window-hook => doom-enter-window-hook

Shorter, easier-to-type names that better describe their intended
purpose.

The old names are still usable, but deprecated.
2018-07-03 03:41:08 +02:00
Henrik Lissner
09cb4f6716
Major refactor & optimization of how modules load their packages
Now that we are loading package autoloads files (as part of the
generated doom-package-autoload-file when running make autoloads), many
:commands properties are redundant. In fact, many def-package! blocks
are redundant.

In some cases, we can do without a config.el file entirely, and can move
into the autoloads file or rely entirely on package autoloads.

Also, many settings have been moved in their module's autoloads files,
which makes them available ASAP; their use no longer depends on module
load order.

This gained me a modest ~10% boost in startup speed.
2018-05-25 00:46:16 +02:00
Henrik Lissner
80adb9c1f6
General refactor for consistency & idempotency
Also updated comments
2018-05-18 01:26:41 +02:00
Henrik Lissner
2364e97285
Fix switch-window hooks when switching with the mouse
And moved it to ui/nav-flash, which is what this code was introduced to
fix in the first place!
2018-03-27 02:50:40 -04:00
Henrik Lissner
3b94bafb3a
tools/nav-flash: refactor & reduce false positive jumps 2018-03-26 06:41:33 -04:00
Henrik Lissner
b848527f0c
ui/nav-flash: fix wrong-type-argument error on recenter 2018-03-26 02:11:11 -04:00
Henrik Lissner
0c4a2cd713
ui/nav-flash: blink after save-place jump 2018-02-02 20:47:33 -05:00
Henrik Lissner
f617995bbe
nav-flash: blink cursor on evil-jump 2017-12-03 20:04:00 -05:00
Henrik Lissner
5319f655b4
Prevent nav-flash from causing seizures in term-mode 2017-09-28 18:22:15 +02:00
Henrik Lissner
cbabf6849c
Standardize module READMEs 2017-08-21 20:13:31 +02:00
Henrik Lissner
c7254e7bdc
Major optimization refactor, across the board
+ enable lexical-scope everywhere (lexical-binding = t): ~5-10% faster
  startup; ~5-20% general boost
+ reduce consing, function calls & garbage collection by preferring
  cl-loop & dolist over lambda closures (for mapc[ar], add-hook, and
  various cl-lib filter/map/reduce functions) -- where possible
+ prefer functions with dedicated opcodes, like assq (see byte-defop's
  in bytecomp.el for more)
+ prefer pcase & cond (faster) over cl-case
+ general refactor for code readability
+ ensure naming & style conventions are adhered to
+ appease byte-compiler by marking unused variables with underscore
+ defer minor mode activation to after-init, emacs-startup or
  window-setup hooks; a customization opportunity for users + ensures
  custom functionality won't interfere with startup.
2017-06-09 00:47:45 +02:00
Henrik Lissner
084c7be50f
Move nav-flash from ui/doom to ui/nav-flash (#92) 2017-06-04 18:28:17 +02:00