smjonas / inc-rename.nvim

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

noice.nvim support appears broken #42

Closed wadeduvall closed 12 months ago

wadeduvall commented 12 months ago

Issue

When set up with noice.nvim inc-rename preset, :IncRename, throws error E471: Argument required. I'm opening this here since I presume the issue is with inc-rename, but if you think its a noice.nvim bug, I can open an issue there.

Minimal config

-- Shoutout to folke for providing a great minimal config for noice.nvim
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "--single-branch",
    "https://github.com/folke/lazy.nvim.git",
    lazypath,
  })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  {
    "folke/noice.nvim",
    dependencies = {
      "MunifTanjim/nui.nvim",
      "rcarriga/nvim-notify",
    },
  },
  {
    "smjonas/inc-rename.nvim",
    cmd = "IncRename",
    config = function()
      require("inc_rename").setup()
    end
  },
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

-- add anything else here
vim.opt.termguicolors = true
vim.cmd([[colorscheme tokyonight]])
require("noice").setup({
  presets = { inc_rename = true }
})

No LSP is needed to reproduce the error; in my config it happens regardless of the LSP attached.

Steps to reproduce

Open any file, navigate to any word, and do :IncRename.

wadeduvall commented 12 months ago

I'm closing this issue because I have resolved the issue! Space is required to actually get it to work, lol.