๐ A fast and lightweight Neovim lua plugin to keep an eye on where your cursor has jumped.
specs.nvim ๐
Show where your cursor moves when jumping large distances (e.g between windows). Fast and lightweight, written completely in Lua.

Install
Using packer.nvim:use {'edluffy/specs.nvim'}
Using vim-plug:
Plug 'edluffy/specs.nvim'
Usage
If you are using init.vim instead of init.lua, remember to wrap block below withlua << EOF and EOF
require('specs').setup{
show_jumps = true,
min_jump = 30,
popup = {
delay_ms = 0, -- delay before popup displays
inc_ms = 10, -- time increments used for fade/resize effects
blend = 10, -- starting blend, between 0-100 (fully transparent), see :h winblend
width = 10,
winhl = "PMenu",
fader = require('specs').linear_fader,
resizer = require('specs').shrink_resizer
},
ignore_filetypes = {},
ignore_buftypes = {
nofile = true,
},
}
:lua require('specs').toggle()
Faders:
- sinus_fader
โฃ/โข\โฃ/โข\โฃ/โข\โฃ/โข - linear_fader
โโโโโโโโ โ โโโโโโ - exp_fader
โโโโโโโโโโโโโ โโ
- pulse_fader
โโโโโ โโโโโโ โโโโ
- empty_fader
โโโโโโโโโโโโโโโ
- shrink_resizer
โโโโโโโโโโโโโโโ
- slide_resizer
โโโโโโโโโโโโโโโ
- empty_resizer
โโโโโโโโโโโโโโโ
require('specs').setup{ popup = { -- Simple constant blend effect fader = function(blend, cnt) if cnt > 100 then return 80 else return nil end end, -- Growing effect from left to right resizer = function(width, ccol, cnt) if width-cnt > 0 then return {width+cnt, ccol} else return nil end end, } }
Keybinds
You can invoke specs from anywhere by using :lua require('specs').show_specs() Add a keybind for this to make it easy to find your cursor at any time.
-- Press <C-b> to call specs!
vim.api.nvimsetkeymap('n', '<C-b>', ':lua require("specs").show_specs()', { noremap = true, silent = true })
-- You can even bind it to search jumping and more, example: vim.api.nvimsetkeymap('n', 'n', 'n:lua require("specs").show_specs()<CR>', { noremap = true, silent = true }) vim.api.nvimsetkeymap('n', 'N', 'N:lua require("specs").show_specs()<CR>', { noremap = true, silent = true })
-- Or maybe you do a lot of screen-casts and want to call attention to a specific line of code: vim.api.nvimsetkeymap('n', '<leader>v', ':lua require("specs").showspecs({width = 97, winhl = "Search", delayms = 610, inc_ms = 21})<CR>', { noremap = true, silent = true })
Planned Features
- [ ] More builtin faders + resizers
- [ ] Colorizers
- [ ] Optional highlight on text yank