noice.nvim icon indicating copy to clipboard operation
noice.nvim copied to clipboard

bug: mini.jump `t` doesn't work if the following key comes too late when using with noice.nvim

Open Frederick888 opened this issue 1 year ago • 9 comments

Did you check docs and existing issues?

  • [X] I have read all the noice.nvim docs
  • [X] I have searched the existing issues of noice.nvim
  • [X] I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

v0.10.0

Operating system/version

macOS 14.5

Describe the bug

Since I had issues with clever-f (#824), I tried https://github.com/echasnovski/mini.jump, and I noticed that if I e.g. dt, then wait for one second or two, and then hit another key, it does nothing.

Steps To Reproduce

  1. nvim -u repro.lua repro.lua
  2. Hit dt
  3. Wait for a second or two (Without noice.nvim, it shows (mini.jump) Enter target single character _ in cmd area. This might be relevant?)
  4. Hit another key

Expected Behavior

It deletes contents until the character given by the third key.

Repro

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  "MunifTanjim/nui.nvim",
  "folke/noice.nvim",
  -- "rhysd/clever-f.vim",
  "echasnovski/mini.jump",
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here

require("noice").setup({
  lsp = {
    -- override markdown rendering so that **cmp** and other plugins use **Treesitter**
    override = {
      ["vim.lsp.util.convert_input_to_markdown_lines"] = true,
      ["vim.lsp.util.stylize_markdown"] = true,
      ["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
    },
  },
  -- you can enable a preset for easier configuration
  presets = {
    bottom_search = true, -- use a classic bottom cmdline for search
    command_palette = true, -- position the cmdline and popupmenu together
    long_message_to_split = true, -- long messages will be sent to a split
    inc_rename = false, -- enables an input dialog for inc-rename.nvim
    lsp_doc_border = false, -- add a border to hover docs and signature help
  },
})

require('mini.jump').setup()

Frederick888 avatar May 28 '24 07:05 Frederick888

I did a bisect and the first bad commit was a0c6203d551242322ac7995b26d4e320140e05b1.

This particular issue was gone after checking out a0c6203d551242322ac7995b26d4e320140e05b1~. There were some minor glitches:

  1. If I do the dt -> wait -> another flow key before the first mini view pops up (using the timer from #824's repro.lua), there won't be any mini views showing at all
  2. If I do the flow after the mini views started popping up, it'll pause the pop-ups, move the existing pop-ups to the left (to accommodate (mini.jump) Enter target single character _ presumably), show (mini.jump) Enter target single character _ after I hit the third key and resume
  3. The pop-ups lose highlights during the wait between dt and the third key

It seems #824 is the same issue, as checking out a0c6203d551242322ac7995b26d4e320140e05b1~ resolved it too.

Frederick888 avatar May 30 '24 00:05 Frederick888

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[bot] avatar Jul 06 '24 01:07 github-actions[bot]

Just tested again and it was still reproducible.

Frederick888 avatar Jul 06 '24 07:07 Frederick888

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[bot] avatar Aug 07 '24 01:08 github-actions[bot]

Just tested again and it was still reproducible. (Sorry for the noise. haven't got the permission to remove labels.)

Frederick888 avatar Aug 07 '24 02:08 Frederick888

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[bot] avatar Sep 07 '24 01:09 github-actions[bot]

Just validated again, still had the issue

Frederick888 avatar Sep 08 '24 07:09 Frederick888

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[bot] avatar Oct 09 '24 02:10 github-actions[bot]

Remove stale.

Frederick888 avatar Oct 11 '24 09:10 Frederick888

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[bot] avatar Nov 11 '24 02:11 github-actions[bot]

Remove stale.

Frederick888 avatar Nov 13 '24 08:11 Frederick888

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[bot] avatar Dec 14 '24 02:12 github-actions[bot]

Remove stale.

Frederick888 avatar Dec 15 '24 11:12 Frederick888

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[bot] avatar Jan 16 '25 02:01 github-actions[bot]

Tested eaed6cc and still could reproduce the issue. Remove stale :)

Frederick888 avatar Jan 16 '25 02:01 Frederick888

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[bot] avatar Feb 16 '25 02:02 github-actions[bot]

Remove stale 🙏 (Tested 0427460)

Frederick888 avatar Feb 17 '25 05:02 Frederick888

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[bot] avatar Mar 20 '25 02:03 github-actions[bot]

Remove stale.

Frederick888 avatar Mar 20 '25 09:03 Frederick888

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[bot] avatar Apr 20 '25 02:04 github-actions[bot]

Tested again using noice.nvim 0427460, nui.nvim 8d3bce9, mini.jump 65bf2c5.

Frederick888 avatar Apr 22 '25 00:04 Frederick888

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[bot] avatar May 22 '25 02:05 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar May 29 '25 02:05 github-actions[bot]

Oops forgot to bump... Reopen?

Frederick888 avatar May 29 '25 02:05 Frederick888