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 work with Neovim Project #34

Open
alexbet opened this issue Oct 30, 2024 · 2 comments
Open

Beacon does not work with Neovim Project #34

alexbet opened this issue Oct 30, 2024 · 2 comments

Comments

@alexbet
Copy link

alexbet commented Oct 30, 2024

Beacon was working fine until I added the Neovim-Project plugin. Now, when I open a project, it seems like Beacon can't find the buffer and displays an error. Here is the Neovim-Project plugin:

https://github.com/coffebar/neovim-project

and here is the error that I am getting on ever movement of the cursor in a bugger:

Screenshot 2024-10-30 at 3 21 07 PM
@f-leeske
Copy link

f-leeske commented Jan 10, 2025

The problem is the incorrect buffer id of beacon's fake buffer that it uses to play the animation, in beacon.lua, l.31:

local fake_buffer = vim.api.nvim_create_buf(false, true)

local function create_window(cfg)
  local window = vim.api.nvim_open_win(fake_buffer, false, {  -- <-- fake_buffer is off if session was loaded with at least one buffer
    relative = 'cursor',
    row = 0,
    col = 0,
    width = cfg.width,
    height = 1,
    style = 'minimal',
    focusable = false,
    noautocmd = true,
  })

My workaround is to lazy-load beacon on the "CursorMoved" event, and I haven't encountered any issues so far:

return {
    "danilamihailov/beacon.nvim",
    event = "CursorMoved",
}

@Irdis
Copy link

Irdis commented Feb 5, 2025

same here please fix it, or warn about it in the installation section

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants