A horizontal "fishbone" position bar for Neovim's global statusline.
Renders the whole file across the bottom row of the screen: every buffer line maps to a column on the bar. Like a one-line minimap.
Requires Neovim 0.10+ and laststatus=3 (set automatically).
lazy.nvim:
{
'alchezar/fishbone.nvim',
event = 'VeryLazy',
opts = {},
}packer.nvim:
use {
'alchezar/fishbone.nvim',
config = function() require('fishbone').setup({}) end,
}<file path> [+] <bar> <E> <W> L:C P%
Each cell composes a top half (overview) and a bottom half (signals):
Top half (▀, highest wins):
| Layer | Color | Source |
|---|---|---|
| cursor | white | current cursor line |
| search | pink | lines matching the active / pattern |
| mark | yellow | vim a-z marks, marks.nvim bookmarks |
| viewport | silver | lines currently visible on screen |
Bottom half (▄, highest wins):
| Layer | Color |
|---|---|
| error | red |
| warn | orange |
| git change | blue |
| git add | green |
| info | cyan |
| hint | purple |
Cells with both halves use ▀ with fg=top, bg=bottom. Cursor with no
bottom layer uses █. Empty cells use ·.
Deletes are an overlay. A line adjacent to a removed git hunk gets a
red ▁ on empty cells, or a red underline added under the cell's existing
glyph - so a delete next to a cursor or diagnostic doesn't hide it.
The minimum is just:
require('fishbone').setup()Colors are resolved in this order, per layer:
opts.colors.<name>you pass tosetup()fgof a linked highlight group from your theme (see below)- Built-in fallback
Themed names (auto-pulled from highlight groups):
| Name | Source highlight |
|---|---|
error |
DiagnosticError |
warn |
DiagnosticWarn |
info |
DiagnosticInfo |
hint |
DiagnosticHint |
git_add |
GitSignsAdd |
git_change |
GitSignsChange |
git_delete |
GitSignsDelete |
If your theme defines those groups, fishbone follows along on ColorScheme
without any extra configuration. To override anything explicitly:
require('fishbone').setup({
colors = {
cursor = '#FFFFFF',
search = '#FF77AA',
mark = '#FFD866',
viewport = '#888888',
git_add = '#7FCC7F', -- wins over GitSignsAdd
},
})setup() also sets laststatus=3 and installs a %! statusline expression.
- Click on the bar to jump the cursor to that line.
<C-o>returns to the previous position (a jumplist entry is added on click). - Drag to scrub the cursor smoothly along the file. Once a drag starts on the bar, mouse Y can leave the statusline row - the cursor still follows the X position; past the bar edges, X sticks at the extreme.
Works in terminal Neovim and Neovide.
- gitsigns.nvim - git add/change/delete markers.
- marks.nvim - numbered bookmarks (vim a-z marks work without it).
Both are optional. The bar still renders if they're missing - those layers just don't light up.
All highlight groups are generated by setup() from opts.colors. If you
want to override them per-colorscheme, the group names are:
FbnT_<name>- top-only cells (cursor,search,mark,viewport)FbnB_<name>- bottom-only cells (error,warn,git_change,git_add,info,hint)FbnT_<top>_B_<bot>- both halvesFbnT_<...>_D,FbnB_<...>_D- same, with delete underline overlayFbnCursorBlock,FbnBase,FbnDel,FbnFile,FbnDim,FbnInfoTxt,FbnErrorTxt,FbnWarnTxt- misc
MIT.
