mirror of
https://github.com/chenasraf/text-transform.nvim.git
synced 2026-05-18 01:48:57 +00:00
refactor: file structure
This commit is contained in:
20
lua/text-transform/popup/init.lua
Normal file
20
lua/text-transform/popup/init.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
local popup = {}
|
||||
|
||||
--- Pops up a selection menu, containing the available case transformers.
|
||||
--- When a transformer is selected, the cursor position/range/columns will be used to replace the
|
||||
--- words around the cursor or inside the selection.
|
||||
---
|
||||
--- The cursor positions/ranges are saved before opening the menu and restored once a selection is
|
||||
--- made.
|
||||
function popup.show_popup()
|
||||
local config = _G.TextTransform.config
|
||||
if config.popup_type == "telescope" then
|
||||
local telescope = require("text-transform.popup.telescope")
|
||||
telescope.telescope_popup()
|
||||
else
|
||||
local select = require("text-transform.popup.select")
|
||||
select.select_popup()
|
||||
end
|
||||
end
|
||||
|
||||
return popup
|
||||
Reference in New Issue
Block a user