edluffy/specs.nvim

github github
editing-supports plugin
star 163
stars
alert-circle 6
open issues
users 3
subscribers
git-branch 4
forks
CREATED

2021-03-13

UPDATED

6 months ago

packer

require('packer').startup(function()
  use 'edluffy/specs.nvim'
end)

paq

require "paq" { 
  'edluffy/specs.nvim'
}

specs.nvim šŸ‘“

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

demo

showcase8 showcase7 showcase6 showcase5 showcase4 showcase3 showcase2 showcase1

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,
        winhl = "PMenu",
        fader = require('specs').linear_fader,
        resizer = require('specs').shrink_resizer
    },
    ignore_filetypes = {},
    ignore_buftypes = {
        nofile = true,
    },
}
  • :lua require('specs').toggle()
    • Toggle Specs on/off

Faders:

  • linear_fader ā–ā–‚ā–‚ā–ƒā–ƒā–„ā–„ā–…ā–…ā–†ā–†ā–‡ā–‡ā–ˆā–ˆ

  • exp_fader ā–ā–ā–ā–ā–‚ā–‚ā–‚ā–ƒā–ƒā–ƒā–„ā–„ā–…ā–†ā–‡

  • pulse_fader ā–ā–‚ā–ƒā–„ā–…ā–†ā–‡ā–ˆā–‡ā–†ā–…ā–„ā–ƒā–‚ā–

  • empty_fader ā–ā–ā–ā–ā–ā–ā–ā–ā–ā–ā–ā–ā–ā–ā–

Resizers:

  • shrink_resizer ā–‘ā–‘ā–’ā–’ā–“ā–ˆā–ˆā–ˆā–ˆā–ˆā–“ā–’ā–’ā–‘ā–‘

  • slide_resizer ā–ˆā–ˆā–ˆā–ˆā–“ā–“ā–“ā–’ā–’ā–’ā–’ā–‘ā–‘ā–‘ā–‘

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

Planned Features

  • More builtin faders + resizers
  • Colorizers
  • Optional highlight on text yank