Closed pillmuncher closed 11 months ago
Glad it's working for you now! Does it also not work if you pass expr = true
to vim.keymap.set
?
Yes, you're right. It was the expr = true
. I'm using lazy.nvim as my plugin manager and accidentally had it written like this:
-- plugins/inc_rename.lua
return {
"smjonas/inc-rename.nvim",
opts = {},
keys = {
{
"<leader>rn",
function()
return ":IncRename " .. vim.fn.expand("<cword>")
end,
desc = "[r]e[n]ame",
mode = { "n" },
{ expr = true }, -- <------------------
},
},
}
Changing it to
expr = true,
fixed it. My bad.
This didn't work:
It had no observable effect whatsoever.
vim.api.nvim_feedkeys()
to the rescue:I don't know if it was my Neovim version (0.9.2) or some other plugin interfering, but now it's working.