Skip to content

is there a way to change the runtime configuration for minimal_menu? #2

@chaneyzorn

Description

@chaneyzorn

I have a similar requirement, is there a way: When I cycle through buffers, the menu stays pinned; then I use vim.fn.timer_start to unpin it. This way, I can make the menu visible only when cycling through buffers and collapse it at other times.

Or in another case: collapse the menu when the CursorMoved or InsertEnter event is triggered, and expand it when the CursorHold or InsertLeave event occurs.

ps: current api expand_menu()/collapse_menu() can not meet my requirement, I don't know why.

      local collapse_timer = nil
      vim.keymap.set("n", "<M-b>", function()
        if collapse_timer then
          vim.fn.timer_stop(collapse_timer)
        end

        require("bento.ui").expand_menu()

        vim.cmd.bnext()

        collapse_timer = vim.fn.timer_start(3000, function()
          require("bento.ui").collapse_menu()
        end)
      end)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions