All Projects → edluffy → specs.nvim

edluffy / specs.nvim

Licence: other
👓 A fast and lightweight Neovim lua plugin to keep an eye on where your cursor has jumped.

Programming Languages

lua
6591 projects
Vim Script
2826 projects

Projects that are alternatives of or similar to specs.nvim

lesvim
Nvim config focus on Javascript, Typescript, Rust and Lua - 🚀 💪 ( Fast and Powerfull ) - Deno and other typescript LSP working well together
Stars: ✭ 69 (-66.18%)
Mutual labels:  neovim, nvim-lua
better-escape.nvim
Escape from insert mode without delay when typing
Stars: ✭ 166 (-18.63%)
Mutual labels:  neovim, nvim-lua
jumpwire.nvim
Jump easily between related files.
Stars: ✭ 16 (-92.16%)
Mutual labels:  neovim, nvim-lua
coc-nginx
nginx-language-server extension for coc.nvim
Stars: ✭ 16 (-92.16%)
Mutual labels:  neovim
vim-colors-plain
Minimal colorscheme for vim
Stars: ✭ 182 (-10.78%)
Mutual labels:  neovim
black-nvim
A Neovim plugin to format your code using Black
Stars: ✭ 23 (-88.73%)
Mutual labels:  neovim
Snowflake
NixOS Flake Configuration.
Stars: ✭ 22 (-89.22%)
Mutual labels:  neovim
luv-vimdocs
No description or website provided.
Stars: ✭ 51 (-75%)
Mutual labels:  neovim
vim
涛叔的 vim 配置
Stars: ✭ 41 (-79.9%)
Mutual labels:  neovim
dotfiles
Dotfiles for my awesomewm/i3 Arch setup & neovim
Stars: ✭ 19 (-90.69%)
Mutual labels:  neovim
agitator.nvim
No description or website provided.
Stars: ✭ 16 (-92.16%)
Mutual labels:  neovim
cmp-treesitter
cmp source for treesitter
Stars: ✭ 69 (-66.18%)
Mutual labels:  neovim
nvimrc
vimrc for neovim written in lua
Stars: ✭ 99 (-51.47%)
Mutual labels:  neovim
gitlinker.nvim
A lua neovim plugin to generate shareable file permalinks (with line ranges) for several git web frontend hosts. Inspired by tpope/vim-fugitive's :GBrowse
Stars: ✭ 181 (-11.27%)
Mutual labels:  neovim
null-ls.nvim
Use Neovim as a language server to inject LSP diagnostics, code actions, and more via Lua.
Stars: ✭ 965 (+373.04%)
Mutual labels:  neovim
dotfiles
My dotfiles for Arch Linux and macOS: Polybar, Neovim, ZSH, Alacritty, Git, and more 👨🏿‍💻
Stars: ✭ 13 (-93.63%)
Mutual labels:  neovim
nvim-lsp-smag
Seamless integration of language server locations into NeoVim
Stars: ✭ 60 (-70.59%)
Mutual labels:  neovim
cmp-under-comparator
nvim-cmp comparator function for completion items that start with one or more underlines
Stars: ✭ 77 (-62.25%)
Mutual labels:  neovim
nixpkgs
My Nix system configs!
Stars: ✭ 143 (-29.9%)
Mutual labels:  neovim
nvim-commaround
nvim plugin to toggle comments on and off
Stars: ✭ 35 (-82.84%)
Mutual labels:  neovim

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

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.nvim_set_keymap('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.nvim_set_keymap('n', 'n', 'n:lua require("specs").show_specs()<CR>', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', 'N', 'N:lua require("specs").show_specs()<CR>', { noremap = true, silent = true })

Planned Features

  • More builtin faders + resizers
  • Colorizers
  • Optional highlight on text yank
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].