beacon.nvim
beacon.nvim copied to clipboard
Beacon does not play nice with 'nvim -d' (diffing).
Steps to reproduce:
-
Create two files (
a
andb
) and changeb
slightly (say add an extra line), make surea
andb
have at least 20 lines, more the better -
With Beacon disabled do
nvim -d a b
(all good, notice that folding is being done correctly) -
With Beacon enabled do
nvim -d a b
(folding is no longer happening, and too much highlighting).
Screenshots:
Working (Beacon disabled):
Failing (Beacon enabled):
Since I use Neovim for git diff
ing 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.
Thanks for feedback :) I'll look into it.
I used this as a hacky workaround if it helps anyone else.
if !&diff
Plug 'danilamihailov/beacon.nvim'
endif
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.