mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
Fallback to using vim.ui.select for refactoring.nvim
This commit is contained in:
parent
3e8fddcd54
commit
7b3b226be9
1 changed files with 4 additions and 2 deletions
|
|
@ -1,10 +1,10 @@
|
||||||
local pick = function()
|
local pick = function()
|
||||||
|
local refactoring = require("refactoring")
|
||||||
if LazyVim.pick.picker.name == "telescope" then
|
if LazyVim.pick.picker.name == "telescope" then
|
||||||
return require("telescope").extensions.refactoring.refactors()
|
return require("telescope").extensions.refactoring.refactors()
|
||||||
elseif LazyVim.pick.picker.name == "fzf" then
|
elseif LazyVim.pick.picker.name == "fzf" then
|
||||||
local fzf_lua = require("fzf-lua")
|
local fzf_lua = require("fzf-lua")
|
||||||
local results = require("refactoring").get_refactors()
|
local results = refactoring.get_refactors()
|
||||||
local refactoring = require("refactoring")
|
|
||||||
|
|
||||||
local opts = {
|
local opts = {
|
||||||
fzf_opts = {},
|
fzf_opts = {},
|
||||||
|
|
@ -16,6 +16,8 @@ local pick = function()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
fzf_lua.fzf_exec(results, opts)
|
fzf_lua.fzf_exec(results, opts)
|
||||||
|
else
|
||||||
|
refactoring.select_refactor()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue