starter/lua/plugins/actions/switch-case.lua

27 lines
932 B
Lua
Raw Normal View History

2024-10-28 10:59:18 +08:00
return {
{
"johmsalas/text-case.nvim",
dependencies = { "nvim-telescope/telescope.nvim" },
event = "BufReadPre",
config = function()
require("textcase").setup({})
require("telescope").load_extension("textcase")
end,
keys = {
"ga", -- Default invocation prefix
{ "ga.", "<cmd>TextCaseOpenTelescope<CR>", mode = { "n", "x" }, desc = "Telescope" },
},
cmd = {
-- NOTE: The Subs command name can be customized via the option "substitude_command_name"
"Subs",
"TextCaseOpenTelescope",
"TextCaseOpenTelescopeQuickChange",
"TextCaseOpenTelescopeLSPChange",
"TextCaseStartReplacingCommand",
},
-- If you want to use the interactive feature of the `Subs` command right away, text-case.nvim
-- has to be loaded on startup. Otherwise, the interactive feature of the `Subs` will only be
-- available after the first executing of it or after a keymap of text-case.nvim has been used.
},
}