|
47 | 47 | ---
|
48 | 48 | --- This is a fire-and-forget coroutine function.
|
49 | 49 | ---
|
50 |
| ----@tparam Region selected_region The selected region to change. |
51 |
| ----@tparam function apply The function to apply to the selected region. |
52 |
| ----@treturn boolean Whether the function has succeeded. |
| 50 | +---@async |
| 51 | +---@param selected_region Region The selected region to change. |
| 52 | +---@param apply function The function to apply to the selected region. |
| 53 | +---@return boolean success Whether the function has succeeded. |
53 | 54 | M.transform_lsp_rename = function(selected_region, apply)
|
54 | 55 | local lsp_rename = require("coerce.vim.lsp").rename
|
55 | 56 |
|
|
64 | 65 | ---
|
65 | 66 | --- If any of the transforms is a coroutine function, the returned function will also be one.
|
66 | 67 | ---
|
67 |
| ----@treturn function |
| 68 | +---@return function |
68 | 69 | M.coalesce_transforms = function(transforms)
|
69 | 70 | local transform = function(...)
|
70 | 71 | for _, t in ipairs(transforms) do
|
|
85 | 86 | --- The LSP rename only works on the symbol under the cursor, so it’s best not
|
86 | 87 | --- to use this function for any other selection mode.
|
87 | 88 | ---
|
88 |
| ---- |
89 |
| ----@tparam Region selected_region The selected region to change. |
90 |
| ----@tparam function apply The function to apply to the selected region. |
91 |
| ----@treturn boolean Whether the function has succeeded. |
| 89 | +---@async |
| 90 | +---@param selected_region Region The selected region to change. |
| 91 | +---@param apply function The function to apply to the selected region. |
| 92 | +---@return boolean success Whether the function has succeeded. |
92 | 93 | M.transform_lsp_rename_with_local_failover = function(selected_region, apply)
|
93 | 94 | return M.coalesce_transforms({
|
94 | 95 | M.transform_lsp_rename,
|
|
0 commit comments