smjonas / inc-rename.nvim

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

invalid key: preview #13

Closed ignamartinoli closed 2 years ago

ignamartinoli commented 2 years ago

After installing the plugin I get the following error message when I open Neovim

packer.nvim: Error running config for inc-rename.nvim: ...ack/packer/start/inc-rename.nvim/lua/inc_rename/init.lua:364: invalid key: preview
smjonas commented 2 years ago

Please make sure to upgrade to Neovim version 0.7.2 or nightly :) The command preview feature was only recently added to Neovim so it doesn't work on older versions. It should work then (let me know if it doesn't).

JuliusSchumacher commented 2 years ago

I'm at 0.7.2 and am experiencing the same issue!

smjonas commented 2 years ago

Oh, that's interesting! Did you change the default config? And just to be completely sure, please tell me the output of the :version command.

JuliusSchumacher commented 2 years ago

version:

>> nvim -v                                                                                                                                                                          
NVIM v0.7.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by builduser

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

config:

 use {
    "smjonas/inc-rename.nvim",
    config = function()
        require("inc_rename").setup()
    end,
}
smjonas commented 2 years ago

Reproduced, thanks. I did not know this myself, but apparently not every commit that is merged into Neovim master will be included in minor releases like 0.7.2. In this case, the command-preview feature is not included in 0.7.2 and you would need to upgrade to a nightly version for the plugin to work.

ignamartinoli commented 2 years ago

Thanks!