Add the with_popup parameter to determine whether or not to use the popup to enter the new name. If popup is disabled, use vim.fn.input to receive the new name.
BREAKING CHANGE: Fallback when popup is disabled/not able to be drawn changed from vim.lsp.buf.rename() to using vim.fn.input() to ask the user for input. This is required for:
setting the quickfix list with the resulting changes
preserving non-GUI input alternative, since Neovim 0.5.2+ will have
its own interface for vim.lsp.buf.rename()
Closes: GH-68
Proposed changes
add with_popup, which by default is true, to determine the way in which the user inputs the new name
change the fallback is popup is unable to be drawn to use vim.fn.input()
add rename._input_lsp_rename() as an alternative to the default popup UI
Test plan
Existing tests are updated to validate the new functionality and new test cases are added to lua/tests/renamer_rename_spec.lua.
Motivation
Add the
with_popup
parameter to determine whether or not to use the popup to enter the new name. If popup is disabled, usevim.fn.input
to receive the new name.BREAKING CHANGE: Fallback when popup is disabled/not able to be drawn changed from
vim.lsp.buf.rename()
to usingvim.fn.input()
to ask the user for input. This is required for:vim.lsp.buf.rename()
Closes: GH-68
Proposed changes
with_popup
, which by default istrue
, to determine the way in which the user inputs the new namevim.fn.input()
rename._input_lsp_rename()
as an alternative to the default popup UITest plan
Existing tests are updated to validate the new functionality and new test cases are added to
lua/tests/renamer_rename_spec.lua
.