Skip to content

Commit 69c3fec

Browse files
committedDec 13, 2024·
chore: improve annotations
1 parent 82b1fce commit 69c3fec

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed
 

‎lua/coerce/transformer.lua

+9-8
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@ end
4747
---
4848
--- This is a fire-and-forget coroutine function.
4949
---
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.
5354
M.transform_lsp_rename = function(selected_region, apply)
5455
local lsp_rename = require("coerce.vim.lsp").rename
5556

@@ -64,7 +65,7 @@ end
6465
---
6566
--- If any of the transforms is a coroutine function, the returned function will also be one.
6667
---
67-
---@treturn function
68+
---@return function
6869
M.coalesce_transforms = function(transforms)
6970
local transform = function(...)
7071
for _, t in ipairs(transforms) do
@@ -85,10 +86,10 @@ end
8586
--- The LSP rename only works on the symbol under the cursor, so it’s best not
8687
--- to use this function for any other selection mode.
8788
---
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.
9293
M.transform_lsp_rename_with_local_failover = function(selected_region, apply)
9394
return M.coalesce_transforms({
9495
M.transform_lsp_rename,

0 commit comments

Comments
 (0)
Please sign in to comment.