Open MrMic opened 3 months ago
Unfortunately, stumbled upon the same problem… Tried syncing all plugins and updating neovim to nightly and now the error occurs:
Error 8:14:47 PM msg_show.lua_error Error executing Lua callback: ...im-data/lazy/multicursors.nvim/lua/multicursors/init.lua:66: attempt to index field 'normal_hydra' (a nil value)
stack traceback:
...im-data/lazy/multicursors.nvim/lua/multicursors/init.lua:66: in function 'new_under_cursor'
...im-data/lazy/multicursors.nvim/lua/multicursors/init.lua:28: in function <...im-data/lazy/multicursors.nvim/lua/multicursors/init.lua:27>
Error 8:12:51 PM msg_show.lua_error Error executing Lua callback: ...im-data/lazy/multicursors.nvim/lua/multicursors/init.lua:60: attempt to index field 'normal_hydra' (a nil value)
stack traceback:
...im-data/lazy/multicursors.nvim/lua/multicursors/init.lua:60: in function 'start'
...im-data/lazy/multicursors.nvim/lua/multicursors/init.lua:20: in function <...im-data/lazy/multicursors.nvim/lua/multicursors/init.lua:19>
Error 8:12:37 PM notify.error vim-illuminate: An internal error has occured: false"...ightly/current/share/nvim/runtime/lua/vim/treesitter.lua:201: attempt to call method 'range' (a nil value)"
Error 8:12:37 PM notify.error lazy.nvim Failed to run `config` for multicursors.nvim
vim/shared.lua:764: s: expected string, got number (1)
# stacktrace:
- vim\shared.lua:1002 _in_ **validate**
- vim\shared.lua:764 _in_ **startswith**
- vim\_init_packages.lua:76 _in_ **__index**
- vim\shared.lua:692 _in_ **islist**
- vim\shared.lua:360 _in_ **can_merge**
- vim\shared.lua:377 _in_ **tbl_deep_extend**
- hydra.nvim\lua\hydra\layer\init.lua:116 _in_ **initialize**
- hydra.nvim\lua\hydra\lib\class.lua:14 _in_ **Layer**
- hydra.nvim\lua\hydra\init.lua:437 _in_ **_setup_pink_hydra**
- hydra.nvim\lua\hydra\init.lua:281 _in_ **initialize**
- hydra.nvim\lua\hydra\lib\class.lua:14 _in_ **Hydra**
- multicursors.nvim\lua\multicursors\layers.lua:196 _in_ **create_normal_hydra**
- multicursors.nvim\lua\multicursors\init.lua:108 _in_ **setup**
I suppose author of multicursors assumed specific version of hydra? But I don't see it pinned anywhere in README or help file.
I'm on https://github.com/nvimtools/hydra.nvim/commit/7f5341643107d05a8d7d4fdea00b29af28517380 and nvim nightly, still cant reproduce this.
I am with the stable release: 3ced42c And I am with AstroNvim
Try using the https://github.com/nvimtools/hydra.nvim as dependency.
I just did it but that did not fix the issue... but I try what @smoka7 said:
return {
"smoka7/multicursors.nvim",
event = "VeryLazy",
dependencies = {
"nvimtools/hydra.nvim",
commit = "7f5341643107d05a8d7d4fdea00b29af28517380",
},
opts = {},
cmd = { "MCstart", "MCvisual", "MCclear", "MCpattern", "MCvisualPattern", "MCunderCursor" },
keys = {
{
mode = { "v", "n" },
"<Leader>mM",
"<cmd>MCstart<cr>",
desc = "Create a selection for selected text or word under the cursor",
},
},
}
And it works again! 😌
@smoka7 are you able to update your hydra package? Thanks.
Rgds,
I tried @MrMic fix, but it does not work on my setup.
nvim nightly (g3b54acdc6c)
nvimtools/hydra.nvim (7f53416)
multicursors.nvim (562809a)
@rachartier My nvim is a stable version: v0.10.1
I hope it may help you.
Describe the bug When I switch to Insert Mode (with "i") or Append Mode with ("a") and I type letter(s) they only appear on the last selected text and not all! It is as if the other(s) selection(s) do not exist!
To Reproduce
Expected behavior Insert or append letter(s) in all selection(s)
Nvim version: v0.10.1
Multicursor version: "multicursors.nvim": { "branch": "main", "commit": "782820896b1691ed664e4c24f1cd9793dcb33dfb" }
I am working with AstroNvim but your plugin is loaded as is. It was working like a charm a few weeks ago...