Skip to content

Commit

Permalink
chore: fix comment style
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorias committed Jun 10, 2024
1 parent 50f2bac commit c48be55
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions lua/coerce/transformer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
local M = {}

--- Returns transformed selected text.
--
--@tparam Region selected_region The selected region to change.
--@tparam function apply The function to apply to the selected region.
--@treturn string
---
---@tparam Region selected_region The selected region to change.
---@tparam function apply The function to apply to the selected region.
---@treturn string
local apply_case_to_selected_region = function(selected_region, apply)
local buffer = 0
local region = require("coerce.region")
Expand All @@ -22,10 +22,10 @@ local apply_case_to_selected_region = function(selected_region, apply)
end

--- Changes the selected text with the apply function using local substitution.
--
--@tparam Region selected_region The selected region to change.
--@tparam function apply The function to apply to the selected region.
--@treturn boolean Whether the function has succeeded.
---
---@tparam Region selected_region The selected region to change.
---@tparam function apply The function to apply to the selected region.
---@treturn boolean Whether the function has succeeded.
M.transform_local = function(selected_region, apply)
local buffer = 0
local region = require("coerce.region")
Expand All @@ -44,10 +44,10 @@ M.transform_local = function(selected_region, apply)
end

--- Changes the selected text with the apply function using LSP rename.
--
--@tparam Region selected_region The selected region to change.
--@tparam function apply The function to apply to the selected region.
--@treturn boolean Whether the function has succeeded.
---
---@tparam Region selected_region The selected region to change.
---@tparam function apply The function to apply to the selected region.
---@treturn boolean Whether the function has succeeded.
M.transform_lsp_rename = function(selected_region, apply)
if not require("coerce.vim.lsp").does_any_client_support_rename() then
return false
Expand All @@ -57,8 +57,10 @@ M.transform_lsp_rename = function(selected_region, apply)
end

--- Returns a transform functions that tries out all transforms until one works.
--
--@treturn function
---
--- If any of the transforms is a coroutine function, the returned function will also be one.
---
---@treturn function
M.coalesce_transforms = function(transforms)
local transform = function(...)
for _, t in ipairs(transforms) do
Expand Down

0 comments on commit c48be55

Please sign in to comment.