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

bug: mini does not show a message after two times #969

Open
4 tasks done
ilan-schemoul opened this issue Oct 13, 2024 · 1 comment
Open
4 tasks done

bug: mini does not show a message after two times #969

ilan-schemoul opened this issue Oct 13, 2024 · 1 comment
Labels
bug Something isn't working stale

Comments

@ilan-schemoul
Copy link

ilan-schemoul commented Oct 13, 2024

Did you check docs and existing issues?

  • I have read all the noice.nvim docs
  • I have updated the plugin to the latest version before submitting this issue
  • I have searched the existing issues of noice.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

NVIM v0.11.0-dev-965+gfb74fd295 Build type: RelWithDebInfo LuaJIT 2.1.1727870382

Operating system/version

WSL ubuntu

Describe the bug

do F three times in a row. The third times nothing appears anymore.
A workaround is typing ":" to show popupmenu then echo filename works again.
After debugging I think the culprit is in lua/noice/ui/init.lua M.enable

    if Manager.tick() > tick then

The condition if true the first two times and false the third.
Note that the problem is only with the backend mini, not with notify. But the bug doesn't seem to be in mini's implem. It just that I think notify, like popupmenu when typing ":", must increase tick (I'm not sure) ?
Note:
It took me many hours of debugging. I will give my two cents: I think that a lot of small functions calling other functions, a lot of abstractions, a ton of dynamic dispatch makes very hard to understand the code as an outsider. To understand a bug you have to understand what calls what, what modifies what data etc. if you're not the person who wrote the code then you don't know the abstractions very well and you struggle a lot to understand what's going on.
So it's just my 2 cents which can be ignored I just felt like maybe a bit less abstractions can help.

Steps To Reproduce

See above

Expected Behavior

Can show more than two times notification with mini

Repro

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

vim.keymap.set("n", "<space>F", "<cmd>echo \"de\"<cr>")

require("lazy.minit").repro({
  spec = {
  -- "folke/noice.nvim",
  dir = "~/code/forks/noice.nvim",
  event = "VimEnter",
  opts = {
    messages = {
      enabled = true, -- enables the Noice messages UI
      -- view_error = "notify",
      -- view_warn = "notify", -- view for warnings
      view = "mini", -- default view for messages
      -- enabled = true,
    },
  },
  dependencies = {
    "MunifTanjim/nui.nvim",
    {
      "rcarriga/nvim-notify",
      opts = {
        fps = 2,
      },
    },
  },
  },
})
@ilan-schemoul ilan-schemoul added the bug Something isn't working label Oct 13, 2024
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

1 participant