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

Context Peek doesn't work on first attempt #148

Open
nullromo opened this issue Oct 1, 2024 · 0 comments
Open

Context Peek doesn't work on first attempt #148

nullromo opened this issue Oct 1, 2024 · 0 comments

Comments

@nullromo
Copy link

nullromo commented Oct 1, 2024

I use this for my context.nvim config

{
    'wellle/context.vim',
    init = function()
        -- Turn off by default
        vim.g.context_enabled = 0
        vim.g.context_highlight_tag = '<hide>'
    end,
    config = function()
        -- Create a command to peek at the current context
        vim.api.nvim_create_user_command(
            'Context',
            'normal :ContextPeek<CR>',
            { bang = true, desc = 'Context peek' }
        )
    end,
    cmd = 'Context',
}

When I call :Context, I expect to see the context peek window appear. However, on the very first time I call it, the window flickers briefly and then goes away. See the video below. The capture is not good enough to see the flicker, but basically the peek comes up for a tiny fraction of a second. So it's working, but then it gets closed straight away.

Recording.2024-10-01.111250.mp4

Every subsequent call to :Context works. I can't exactly figure out when this occurs, but it seems like it happens on every new buffer. But I think sometimes it also happens within the same buffer if I scroll around.

Any idea what could be causing this?

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