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

Incompatible with lewis6991/hover.nvim ? #7

Open
aemonge opened this issue Jan 28, 2025 · 0 comments
Open

Incompatible with lewis6991/hover.nvim ? #7

aemonge opened this issue Jan 28, 2025 · 0 comments

Comments

@aemonge
Copy link

aemonge commented Jan 28, 2025

Hey, probably you can fix this like, super mega fast. Both are you plugins, so I belive it's a settings issue.

The problem

Error executing vim.schedule lua callback: ...ge/.local/share/nvim/lazy/hover.nvim/lua/hover/async.lua:37: The coroutine
 failed with this message: /usr/share/nvim/runtime/lua/vim/diagnostic.lua:326: Invalid buffer id: 1
stack traceback:
        [C]: in function 'nvim_create_autocmd'
        /usr/share/nvim/runtime/lua/vim/diagnostic.lua:326: in function '__index'
        /usr/share/nvim/runtime/lua/vim/diagnostic.lua:771: in function 'get_diagnostics'
        /usr/share/nvim/runtime/lua/vim/diagnostic.lua:1090: in function 'get'
        .../nvim/lazy/hover.nvim/lua/hover/providers/diagnostic.lua:77: in function 'enabled'
        .../.local/share/nvim/lazy/hover.nvim/lua/hover/actions.lua:19: in function 'is_enabled'
        .../.local/share/nvim/lazy/hover.nvim/lua/hover/actions.lua:236: in function <.../.local/share/nvim/lazy/hover.n
vim/lua/hover/actions.lua:218>
stack traceback:
        [C]: in function 'error'
        ...ge/.local/share/nvim/lazy/hover.nvim/lua/hover/async.lua:37: in function <...ge/.local/share/nvim/lazy/hover.
nvim/lua/hover/async.lua:32>

It happes only when I enable hover.nvim with:

return {
    "lewis6991/hover.nvim",
    event = "LspAttach", -- Same with VeryLazy and nil
    config = function()
        require("hover").setup {
            init = function()
                -- Require providers
                require("hover.providers.lsp")
                -- require('hover.providers.gh')
                -- require('hover.providers.gh_user')
                -- require('hover.providers.jira')
                -- require('hover.providers.dap')
                require('hover.providers.fold_preview')
                require('hover.providers.diagnostic')
                require('hover.providers.man')
            end,
            preview_opts = {
                border = 'rounded'
            },
            -- Whether the contents of a currently open hover window should be moved
            -- to a :h preview-window when pressing the hover keymap.
            preview_window = true,
            title = true,
            mouse_providers = {},
            mouse_delay = 1000
        }
        vim.keymap.set("n", "K", require("hover").hover, {desc = "hover.nvim"})
        -- Setup keymaps see mappings.core.mason
    end
}
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

1 participant