smjonas / inc-rename.nvim

Incremental LSP renaming based on Neovim's command-preview feature.
MIT License
637 stars 8 forks source link

Keymap doesn't work #34

Closed TroySigX closed 1 year ago

TroySigX commented 1 year ago

The keymap vim.keymap.set("n", "<leader>rn", ":IncRename ") gives the error: E471: Argument required

smjonas commented 1 year ago

Try <leader>rn while your cursor is above a variable. The argument to the :IncRename command (which this keymap opens) should be the renamed variable name, e.g. do :IncRename new_name<enter>.

marcus-dc commented 4 months ago

Sorry for bumping this after a year but I'm getting this error now image

I works the first time but doesn't afterwards. Tried reopening neovim and it's still doesn't work.

smjonas commented 4 months ago

Sorry for bumping this after a year but I'm getting this error now image

I works the first time but doesn't afterwards. Tried reopening neovim and it's still doesn't work.

So did you type the command like :IncRename<enter> or did you write any arguments after the command name? You need to specify the variable name after the command.

marcus-dc commented 4 months ago

I wasn't really able to complete the command. When I type :Inc it looks like it automatically enters it (I'm not really sure tho). Also happens when I try to use the keymap that was in the docs <leader>rn (Browsed my keymaps just to be sure it wasn't doubled up with some other keymap).

smjonas commented 4 months ago

Sorry, I can't reproduce this. I would need more detailed reproduction steps if possible.