Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bluz71 opened this issue Jul 8, 2020 · 3 comments
Open

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

bluz71 opened this issue Jul 8, 2020 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@bluz71
Copy link

bluz71 commented Jul 8, 2020

Steps to reproduce:

  • Create two files (a and b) and change b slightly (say add an extra line), make sure a and b 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):

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 DanilaMihailov self-assigned this Jul 9, 2020
@DanilaMihailov DanilaMihailov added the bug Something isn't working label Jul 9, 2020
@DanilaMihailov
Copy link
Owner

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

@dpendolino
Copy link

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

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

Suida added a commit to Suida/beacon.nvim that referenced this issue Sep 13, 2021
@lyokha
Copy link

lyokha commented Oct 14, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants