Skip to content

Commit

Permalink
chore: add type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelroses committed Sep 5, 2024
1 parent cbff08b commit 029777a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lua/freeze/init.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
local M = {}

---@param ... table
local function is_array(...)
if vim.fn.has("nvim-0.10") == 1 then
return vim.isarray(...)
Expand Down Expand Up @@ -43,6 +44,7 @@ M.allowed_opts = {
},
}

---@param opts table
M.parse_options = function(opts)
local options

Expand Down Expand Up @@ -79,6 +81,10 @@ M.parse_options = function(opts)
return options
end

---@param cmd table
---@param args table
---@param tbl table
---@param prefix string
local function populate_cmd(cmd, args, tbl, prefix)
for k, v in pairs(tbl) do
-- handle margin and padding separately as tables
Expand Down Expand Up @@ -111,6 +117,9 @@ local function populate_cmd(cmd, args, tbl, prefix)
end

-- Generate the command line arguments
---@param args table
---@param options table
---@return table
M.get_arguments = function(args, options)
local cmd = {}

Expand All @@ -120,6 +129,10 @@ M.get_arguments = function(args, options)
return cmd
end

-- get lines and format them for the command
---@param cmdline table
---@param args table
---@return table lines, table cmdline
M.format_lines = function(cmdline, args)
local begin_line = args.line1 - 1
local finish_line = args.line2
Expand All @@ -144,6 +157,8 @@ M.format_lines = function(cmdline, args)
return lines, cmdline
end

---@param args table
---@param options table
M.start = function(args, options)
local lines = nil

Expand Down

0 comments on commit 029777a

Please sign in to comment.