DanilaMihailov / beacon.nvim

Whenever cursor jumps some distance or moves between windows, it will flash so you can see where it is
324 stars 7 forks source link

Beacon does not play nice with 'nvim -d' (diffing). #16

Open bluz71 opened 4 years ago

bluz71 commented 4 years ago

Steps to reproduce:

Screenshots:

Working (Beacon disabled):

Diff_Working

Failing (Beacon enabled):

Diff_Failing

Since I use Neovim for git diffing this is a showstopping issue preventing me from adopting Beacon. However, I would love to use Beacon since it, from my testing, is a nice productivity improvement.

Hopefully it is an easy fix. Heck, I would be fine if Beacon was entirely disabled in diff-mode, but enabled in normal editing mode.

Thanks.

DanilaMihailov commented 4 years ago

Thanks for feedback :) I'll look into it.

dpendolino commented 3 years ago

I used this as a hacky workaround if it helps anyone else.

if !&diff
  Plug 'danilamihailov/beacon.nvim'
endif
lyokha commented 1 year ago

I used this as a hacky workaround if it helps anyone else.

if !&diff
  Plug 'danilamihailov/beacon.nvim'
endif

There is another method which still loads the plugin. My beacon settings are

let g:beacon_enable = 0
autocmd VimEnter * if !&diff | let g:beacon_enable = 1 | endif
nmap <silent> <space> :Beacon<CR>

The beacon is disabled at the start of nvim and gets enabled at the VimEnter event if nvim was not started in diff-mode. Note that command :Beacon still works even in diff-mode.