docs: note the intentional density + verbose-comments tradeoff
Add a 5-line style note at the top of lua/tiny-jump/init.lua and mirror the same message in the README under the size-comparison section. The comments in this file are load-bearing — they do the explanatory work that would otherwise be done by helper functions and verbose names. Prevents future-me (or a drive-by PR) from 'cleaning up' the comments as redundant.
This commit is contained in:
2 files changed
+13
-1
No files matched your search
@@ -15,7 +15,7 @@ to the original author for a clean, focused implementation.
|
|||||||
I forked it because I wanted to pass label highlight attributes directly to
|
I forked it because I wanted to pass label highlight attributes directly to
|
||||||
`setup()` (instead of having to define a separate highlight group and re-apply
|
`setup()` (instead of having to define a separate highlight group and re-apply
|
||||||
it on every colorscheme change). I submitted that as a
|
it on every colorscheme change). I submitted that as a
|
||||||
(PR)[https://github.com/yorickpeterse/nvim-jump/pull/8] but it was declined,
|
[PR](https://github.com/yorickpeterse/nvim-jump/pull/8) but it was declined,
|
||||||
which is the maintainer's right — the upstream plugin is explicitly considered
|
which is the maintainer's right — the upstream plugin is explicitly considered
|
||||||
feature-complete.
|
feature-complete.
|
||||||
|
|
||||||
@@ -43,6 +43,13 @@ cursor-proximity sorting, and two-char labels for overflow matches, this fork is
|
|||||||
slightly _smaller_ than upstream — and an order of magnitude smaller than every
|
slightly _smaller_ than upstream — and an order of magnitude smaller than every
|
||||||
other alternative on this list.
|
other alternative on this list.
|
||||||
|
|
||||||
|
### A note on style
|
||||||
|
|
||||||
|
The code is intentionally dense. Comments are thorough by design — they do the
|
||||||
|
explanatory work that would otherwise be done by helper functions and verbose
|
||||||
|
names. If you're reading or editing `lua/tiny-jump/init.lua`, read the comments
|
||||||
|
first. Don't "clean them up" — they're the docs.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- Neovim 0.11.0 or newer.
|
- Neovim 0.11.0 or newer.
|
||||||
|
|||||||
@@ -5,6 +5,11 @@
|
|||||||
-- This Source Code Form is subject to the terms of the Mozilla Public
|
-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
-- License, v. 2.0. If a copy of the MPL was not distributed with this
|
-- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
-- file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
-- file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
--
|
||||||
|
-- Style note: this file is intentionally dense (126 SLOC in one file).
|
||||||
|
-- Comments are thorough by design — they do the explanatory work normally
|
||||||
|
-- done by helper functions and verbose names. If you're editing here, read
|
||||||
|
-- the comments first.
|
||||||
|
|
||||||
local api, fn, M = vim.api, vim.fn, {}
|
local api, fn, M = vim.api, vim.fn, {}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user