👓 A fast and lightweight Neovim lua plugin to keep an eye on where your cursor has jumped.
Find a file
2021-03-17 18:12:48 +00:00
lua/specs Cleanup + remove win_id args 2021-03-17 17:46:39 +00:00
plugin Add user options + popup on cursor jump 2021-03-14 19:18:18 +00:00
README.md Update README.md 2021-03-17 18:12:48 +00:00

specs.nvim 👓

Show where your cursor moves when jumping large distances (e.g between windows). Fast and lightweight, written completely in Lua. WIP.

demo

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 with lua << 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,
        fader = require('specs').linear_fader,
        resizer = require('specs').shrink_resizer
    }
}

You can implement your own custom fader/resizer functions for some pretty cool effects:

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,
    }
}