2021-06-17 15:39:41 +00:00
|
|
|
-- https://github.com/lukas-reineke/dotfiles/blob/master/vim/lua/lsp/rename.lua
|
|
|
|
local M = {}
|
2021-12-16 21:54:36 +00:00
|
|
|
local util = require('navigator.util')
|
|
|
|
-- local rename_prompt = 'Rename -> '
|
2021-06-17 15:39:41 +00:00
|
|
|
|
|
|
|
M.rename = function()
|
2021-12-16 21:54:36 +00:00
|
|
|
local input = vim.ui.input
|
2021-06-17 15:39:41 +00:00
|
|
|
|
2021-12-16 21:54:36 +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-12-16 21:54:36 +00:00
|
|
|
|
2021-06-17 15:39:41 +00:00
|
|
|
return M
|