local icon = require("fschauen.util.icons").ui.Text local description = icon .. " [c]hange text [c]ase" local theme = function() return require("telescope.themes").get_cursor() end return { "johmsalas/text-case.nvim", dependencies = "nvim-telescope/telescope.nvim", cmd = { "TextCaseOpenTelescope", "TextCaseOpenTelescopeQuickChange", "TextCaseOpenTelescopeLSPChange", "TextCaseStartReplacingCommand", }, keys = { { "cc", function() require("telescope").extensions.textcase.normal_mode(theme()) end, mode = "n", desc = description, }, --[[ Ideally this would be the mapping for visual mode, but it doesn't work due to bugs in textcase. { "cc", function() require("telescope").extensions.textcase.visual_mode(theme()) end, mode = "v", desc = description, }, The mapping below works, but I can't set the theme to `cursor`. --]] { "cc", "TextCaseOpenTelescope", mode = "v", desc = description, }, }, config = function() require("textcase").setup { default_keymappings_enabled = false, } require("telescope").load_extension("textcase") end, }