Commit Graph
2 Commits
Author SHA1 Message Date
swaits 5348eaa1da refactor: code-golf pass + explanatory comments
Two logical changes that landed as one file rewrite:

1. Tighten the code. SLOC 168 -> 126 (-42), total lines 201 -> 146
   pre-comments. Moves: inline single-statement if/while bodies (via
   stylua's `collapse_simple_statement = Always` and `column_width
   = 120`), collapse K-termcode table to one line, combine api/fn/M
   into one local declaration, drop verbose config comments, merge
   `two` / `ivs_by_line` / `li` into one local, inline CR-branch
   loop, drop the apply-indirection in setup(), and assorted smaller
   trims.

2. Re-add prose where the golf made intent non-obvious. Comments now
   explain: smartcase detection, the +start_line/-2 offset reconcile,
   the *global* avail disqualification, the cursor-proximity sort
   purpose, the slow/fast char encoding of pair labels (and why it
   keeps `prefixes` minimal), the overlap-skip interval math and the
   carryover-to-next-match behavior, why the augroup is recreated per
   setup call, and why table-form labels own a dedicated highlight
   group. No code change from the comment pass itself.

Final sizes: 126 SLOC, 194 total lines including 55 comment lines
and 13 blank lines. Still smaller than upstream (131 SLOC) and one
to two orders of magnitude smaller than every other jump plugin.
2026-04-13 21:42:14 -06:00
swaits e5c574ca3d initial commit: fork of yorickpeterse/nvim-jump
Fork of https://github.com/yorickpeterse/nvim-jump (MPL-2.0) with one
addition: `label` accepts a table of nvim_set_hl attributes in
addition to a group name, and the plugin re-applies it on ColorScheme.

Upstream declined the feature as out of scope (the project is
considered feature-complete), so it lives here instead. Credit for the
core implementation goes to Yorick Peterse.

Changes relative to upstream:
- Module renamed 'jump' -> 'tiny-jump'
- Namespace and augroup renamed accordingly
- Internal managed highlight group renamed 'JumpLabel' -> 'TinyJumpLabel'
- Default `label` changed from 'FlashLabel' to 'IncSearch' (no longer
  catering to flash.nvim migration)
- README rewritten
2026-04-13 19:55:16 -06:00