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

Weird conflicting behavior with dial.nvim #1059

Closed
3 tasks done
simonmandlik opened this issue Jul 14, 2024 · 1 comment
Closed
3 tasks done

Weird conflicting behavior with dial.nvim #1059

simonmandlik opened this issue Jul 14, 2024 · 1 comment

Comments

@simonmandlik
Copy link

simonmandlik commented Jul 14, 2024

Contributing guidelines

Module(s)

mini.clue

Description

I am using dial.nvim alongside mini.clue and have recently noticed that <C-a> in visual mode doesn't work. In normal mode <C-a> works, and <C-x> work in both modes.

When I comment out g triggers, it works again.

I have also opened similar issue with dial.nvim: monaqa/dial.nvim#94

MWE:

local root = vim.fn.fnamemodify("./.repro", ":p")
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
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)

local plugins = {
    "monaqa/dial.nvim",
    {
        "echasnovski/mini.clue",
        opts = function()
            return {
                triggers = {
                    { mode = "n", keys = "g" },
                    { mode = "v", keys = "g" }
                }
            }
        end
    }
}

require("lazy").setup(plugins, { root = root .. "/plugins", })

vim.keymap.set("n", "<C-a>", function()
    print("n <C-a>")
    require("dial.map").manipulate("increment", "normal")
end)
vim.keymap.set("v", "<C-a>", function()
    print("v <C-a>")
    require("dial.map").manipulate("increment", "visual")
end)
vim.keymap.set("n", "<C-x>", function()
    print("n <C-x>")
    require("dial.map").manipulate("decrement", "normal")
end)
vim.keymap.set("v", "<C-x>", function()
    print("v <C-x>")
    require("dial.map").manipulate("decrement", "visual")
end)

Neovim version

0.10.0

@simonmandlik simonmandlik added the bug Something isn't working label Jul 14, 2024
@echasnovski echasnovski added mini.clue and removed bug Something isn't working labels Jul 15, 2024
@echasnovski
Copy link
Owner

Thanks for the issue!

I believe monaqa/dial.nvim#95 should resolve this. Using :normal! ... instead of :normal ... is indeed a preferred way to execute some default Normal mode functionality.

Closing as not really an issue with 'mini.clue'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants