==============================================================================
------------------------------------------------------------------------------
                                                         *TextTransform.setup()*
                         `TextTransform.setup`({opts})
Setup TextTransform options and merge them with user provided ones.


==============================================================================
------------------------------------------------------------------------------
                                                 *TextTransform.init_commands()*
                        `TextTransform.init_commands`()
Initializes user commands
@private


==============================================================================
------------------------------------------------------------------------------
                                                         *TextTransform.options*
                            `TextTransform.options`
Your plugin configuration with its default values.

Default values:
>
  TextTransform.options = {
    -- Prints information about internals of the plugin. Very verbose, only useful for debugging.
    debug = false,
    -- Keymap configurations
    keymap = {
      -- Keymap to open the telescope popup. Set to `false` or `nil` to disable keymapping
      -- You can always customize your own keymapping manually.
      telescope_popup = {
        -- Opens the popup in normal mode
        ["n"] = "<Leader>~",
        -- Opens the popup in visual/visual block modes
        ["v"] = "<Leader>~",
      },
    },
  }

  local function init()
    local o = TextTransform.options
    D.log("config", "Initializing TextTransform with %s", utils.dump(o))
    commands.init_commands()

    if o.keymap.telescope_popup then
      local keys = o.keymap.telescope_popup
      if keys.n then
        vim.keymap.set("n", keys.n, telescope.popup, { silent = true })
      end
      if keys.v then
        vim.keymap.set("v", keys.v, telescope.popup, { silent = true })
      end
    end
  end

<

------------------------------------------------------------------------------
                                                         *TextTransform.setup()*
                        `TextTransform.setup`({options})
Define your text-transform setup.

Parameters ~
{options} `(table)` Module config table. See |TextTransform.options|.

Usage ~
`require("text-transform").setup()` (add `{}` with your |TextTransform.options| table)


==============================================================================
------------------------------------------------------------------------------
                                                        *find_word_boundaries()*
                  `find_word_boundaries`({line}, {start_col})
Finds the boundaries of the surrounding word around `start_col` within `line`.
@param line number
@param start_col number
@return number start_col, number end_col

------------------------------------------------------------------------------
                                                  *TextTransform.replace_word()*
           `TextTransform.replace_word`({transform_name}, {position})
Replace the word under the cursor with the given transform.
If `position` is provided, replace the word under the given position.
Otherwise, attempts to find the word under the cursor.

@param transform_name string The transformer name
@param position table|nil A table containing the position of the word to replace

------------------------------------------------------------------------------
                                               *TextTransform.replace_columns()*
               `TextTransform.replace_columns`({transform_name})
Replaces each column in visual block mode selection with the given transform.
Assumes that the each selection is 1 character and operates on the whole word under each cursor.

------------------------------------------------------------------------------
                                             *TextTransform.replace_selection()*
              `TextTransform.replace_selection`({transform_name})
Replaces a selection with the given transform. This function attempts to infer the replacement
type based on the cursor positiono and visual selections, and passes information to relevant
range replacement functions.

@param transform_name string The transformer name

------------------------------------------------------------------------------
                                  *TextTransform.get_visual_selection_details()*
                 `TextTransform.get_visual_selection_details`()
Takes the saved positions and translates them into individual visual ranges, regardless of how
the original selection was performed.

This allows to treat all ranges equally and allows to work on each selection without knowing
the full information around the selection logic.


==============================================================================
------------------------------------------------------------------------------
                                                        *TextTransform.toggle()*
                            `TextTransform.toggle`()
Toggle the plugin by calling the `enable`/`disable` methods respectively.
@private

------------------------------------------------------------------------------
                                                        *TextTransform.enable()*
                            `TextTransform.enable`()
Enables the plugin
@private

------------------------------------------------------------------------------
                                                *TextTransform.save_positions()*
                        `TextTransform.save_positions`()
Save the current cursor position, mode, and visual selection ranges
@private

------------------------------------------------------------------------------
                                             *TextTransform.restore_positions()*
                   `TextTransform.restore_positions`({state})
Restore the cursor position, mode, and visual selection ranges saved using `save_position()`,
or a given modified state, if passed as the first argument


==============================================================================
------------------------------------------------------------------------------
                                                         *TextTransform.popup()*
                            `TextTransform.popup`()
Pops up a telescope 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.


==============================================================================
------------------------------------------------------------------------------
                                                      *TextTransform.to_words()*
                       `TextTransform.to_words`({string})
Splits a string into words.
@param string string
@return table

------------------------------------------------------------------------------
                                               *TextTransform.transform_words()*
     `TextTransform.transform_words`({words}, {with_word_cb}, {separator})
Transforms a table of strings into a string using a callback and separator.
The callback is called with the word, the index, and the table of words.
The separator is added between each word.

@param words string|table string or table of strings
@param with_word_cb function (word: string, index: number, words: table) -> string
@param separator string|nil (optional)
@return string

------------------------------------------------------------------------------
                                                 *TextTransform.to_camel_case()*
                    `TextTransform.to_camel_case`({string})
Transforms a string into camelCase.
@param string string
@return string

------------------------------------------------------------------------------
                                                 *TextTransform.to_snake_case()*
                    `TextTransform.to_snake_case`({string})
Transfroms a string into snake_case.
@param string any
@return string

------------------------------------------------------------------------------
                                                *TextTransform.to_pascal_case()*
                    `TextTransform.to_pascal_case`({string})
Transforms a string into PascalCase.
@param string string
@return string

------------------------------------------------------------------------------
                                                 *TextTransform.to_title_case()*
                    `TextTransform.to_title_case`({string})
Transforms a string into Title Case.
@param string string
@return string

------------------------------------------------------------------------------
                                                 *TextTransform.to_kebab_case()*
                    `TextTransform.to_kebab_case`({string})
Transforms a string into kebab-case.
@param string string
@return string

------------------------------------------------------------------------------
                                                   *TextTransform.to_dot_case()*
                     `TextTransform.to_dot_case`({string})
Transforms a string into dot.case.
@param string string
@return string

------------------------------------------------------------------------------
                                                 *TextTransform.to_const_case()*
                    `TextTransform.to_const_case`({string})
Transforms a string into CONSTANT_CASE.
@param string string
@return string


==============================================================================
------------------------------------------------------------------------------
                                                                 *utils.merge()*
                           `utils.merge`({t1}, {t2})
Merges two tables into one. Same as `vim.tbl_extend("keep", t1, t2)`.
Mutates the first table.

TODO accept multiple tables to merge

@param t1 table
@param t2 table
@return table

------------------------------------------------------------------------------
                                                                  *utils.dump()*
                              `utils.dump`({obj})
Dumps the object into a string.
@param obj any
@return string


 vim:tw=78:ts=8:noet:ft=help:norl: