DanilaMihailov/beacon.nvim

Whenever cursor jumps some distance or moves between windows, it will flash so you can see where it is

656

stars

69

commits

Lua

primary language

Jun 25, 2024

updated

neovim
neovim-plugin

README

Beacon.nvim - never lose your cursor again!

Highlight cursor when it moves, changes windows and more! This plugin is heavily inspired by emacs package beacon.

https://github.com/DanilaMihailov/beacon.nvim/assets/1163040/df4a603e-66c7-4bdb-9704-54a168d59ee7

Installation

lazy.nvim

{ 'danilamihailov/beacon.nvim' } -- lazy calls setup() by itself

Or use your favorite plugin manager, you'll need to call setup require('beacon').setup()

[!NOTE] For Vim versions checkout v1 tags v1.3.4

Customization

Default config

 {
  enabled = true, --- (boolean | fun():boolean) check if enabled
  speed = 2, --- integer speed at wich animation goes
  width = 40, --- integer width of the beacon window
  winblend = 70, --- integer starting transparency of beacon window :h winblend
  fps = 60, --- integer how smooth the animation going to be
  min_jump = 10, --- integer what is considered a jump. Number of lines
  cursor_events = { 'CursorMoved' }, -- table<string> what events trigger check for cursor moves
  window_events = { 'WinEnter', 'FocusGained' }, -- table<string> what events trigger cursor highlight
  highlight = { bg = 'white', ctermbg = 15 }, -- vim.api.keyset.highlight table passed to vim.api.nvim_set_hl
}

Changing color

Beacon is highlighted by Beacon group, so you can change it like this:

vim.api.nvim_set_hl(0, 'Beacon', { bg = 'white' })

or simplier way is to change highlight params in config

check :help nvim_set_hl() for more options.

[!NOTE] checkout doc/beacon.txt for more

Similar plugins

Contributors

DanilaMihailov

66 commits

ayyess

1 commits

infinite-ops

1 commits

kevintraver

1 commits

DanilaMihailov/beacon.nvim

Whenever cursor jumps some distance or moves between windows, it will flash so you can see where it is

656

stars

69

commits

Lua

primary language

Jun 25, 2024

updated

neovim
neovim-plugin

README

Beacon.nvim - never lose your cursor again!

Highlight cursor when it moves, changes windows and more! This plugin is heavily inspired by emacs package beacon.

https://github.com/DanilaMihailov/beacon.nvim/assets/1163040/df4a603e-66c7-4bdb-9704-54a168d59ee7

Installation

lazy.nvim

{ 'danilamihailov/beacon.nvim' } -- lazy calls setup() by itself

Or use your favorite plugin manager, you'll need to call setup require('beacon').setup()

[!NOTE] For Vim versions checkout v1 tags v1.3.4

Customization

Default config

 {
  enabled = true, --- (boolean | fun():boolean) check if enabled
  speed = 2, --- integer speed at wich animation goes
  width = 40, --- integer width of the beacon window
  winblend = 70, --- integer starting transparency of beacon window :h winblend
  fps = 60, --- integer how smooth the animation going to be
  min_jump = 10, --- integer what is considered a jump. Number of lines
  cursor_events = { 'CursorMoved' }, -- table<string> what events trigger check for cursor moves
  window_events = { 'WinEnter', 'FocusGained' }, -- table<string> what events trigger cursor highlight
  highlight = { bg = 'white', ctermbg = 15 }, -- vim.api.keyset.highlight table passed to vim.api.nvim_set_hl
}

Changing color

Beacon is highlighted by Beacon group, so you can change it like this:

vim.api.nvim_set_hl(0, 'Beacon', { bg = 'white' })

or simplier way is to change highlight params in config

check :help nvim_set_hl() for more options.

[!NOTE] checkout doc/beacon.txt for more

Similar plugins

Contributors

DanilaMihailov

66 commits

ayyess

1 commits

infinite-ops

1 commits

kevintraver

1 commits

Languages

Lua

100.0%