navigator.lua/lua/navigator/rename.lua

17 lines
374 B
Lua
Raw Normal View History

2021-06-17 15:39:41 +00:00
-- https://github.com/lukas-reineke/dotfiles/blob/master/vim/lua/lsp/rename.lua
local M = {}
local util = require('navigator.util')
-- local rename_prompt = 'Rename -> '
2021-06-17 15:39:41 +00:00
M.rename = function()
local input = vim.ui.input
2021-06-17 15:39:41 +00:00
vim.ui.input = require('guihua.floating').input
vim.lsp.buf.rename()
vim.defer_fn(function()
vim.ui.input = input
end, 1000)
2021-06-17 15:39:41 +00:00
end
2021-06-17 15:39:41 +00:00
return M