Skip to content

Commit 819e9da

Browse files
committed
chore: Add types
1 parent 26daa56 commit 819e9da

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

lua/debugprint/counter.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
local M = {}
22

3+
---@type integer?
34
local default_counter
45

56
local DATA_PATH = vim.fs.joinpath(vim.fn.stdpath("data"), "debugprint")

lua/debugprint/init.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ local utils_errors = require("debugprint.utils.errors")
66
local utils_operator = require("debugprint.utils.operator")
77
local utils_register = require("debugprint.utils.register")
88

9+
---@type debugprint.GlobalOptions
910
local global_opts
1011

1112
---@param display_counter? boolean|function
@@ -24,6 +25,7 @@ local get_debugline_tag_and_counter = function(display_counter)
2425
tag_and_counter = tag_and_counter .. tostring(display_counter())
2526
end
2627

28+
---@cast tag_and_counter string
2729
return tag_and_counter
2830
end
2931

@@ -116,6 +118,7 @@ end
116118
---@param fileconfig debugprint.FileTypeConfig
117119
---@return string
118120
local construct_debugprint_line = function(opts, fileconfig)
121+
---@type string
119122
local line_to_insert
120123

121124
if opts.variable_name then
@@ -145,6 +148,7 @@ end
145148
---@param opts debugprint.FunctionOptionsInternal
146149
---@return string
147150
local get_debugprint_line = function(opts)
151+
---@type string
148152
local line_to_insert
149153

150154
local filetype_config =
@@ -170,6 +174,7 @@ local add_to_register = function(opts, keys)
170174
utils_register.set_register(keys)
171175

172176
if global_opts.notify_for_registers then
177+
---@type string
173178
local content
174179

175180
if opts.variable_name then
@@ -208,6 +213,7 @@ local handle_debugprint_line = function(opts)
208213
line_nr = line_nr - 1
209214
end
210215

216+
---@type boolean
211217
local move_to_debugline = global_opts.move_to_debugline
212218

213219
if opts.surround == true then

lua/debugprint/printtag_operations.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ local M = {}
22

33
local utils_buffer = require("debugprint.utils.buffer")
44

5+
---@type string
56
local print_tag
67

78
---@param tag string
@@ -39,6 +40,7 @@ local buffer_action = function(opts, action, action_present, action_past)
3940
end
4041
end
4142

43+
---@type string
4244
local linestring
4345
if actioned_count == 1 then
4446
linestring = "line"

0 commit comments

Comments
 (0)