From 050902a135be1cd4ef5448cc7d02cda17997c795 Mon Sep 17 00:00:00 2001 From: ray-x Date: Mon, 7 Nov 2022 23:20:06 +1100 Subject: [PATCH] neovim 0.9.x title option --- lua/navigator/rename.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lua/navigator/rename.lua b/lua/navigator/rename.lua index 00d8eaf..adea233 100644 --- a/lua/navigator/rename.lua +++ b/lua/navigator/rename.lua @@ -350,7 +350,8 @@ M.rename_preview = function() state.win_id = vim.fn.win_getid(0) state.lsp_params = make_position_params() state.preview_buf = vim.api.nvim_get_current_buf() - ghinput.setup({ + + local inputopts = { on_change = function(new_name) incremental_rename_preview({ args = new_name }, ns, state.preview_buf) end, @@ -365,7 +366,11 @@ M.rename_preview = function() teardown(true) log('cancel', new_name) end, - }) + } + if vim.fn.has('nvim-0.9.0') == 1 then + inputopts.title = 'inc rename' + end + ghinput.setup(inputopts) vim.ui.input = ghinput.input vim.lsp.buf.rename()