Skip to content

Commit 3859e21

Browse files
committed
fix: Typing issue
1 parent 52ced26 commit 3859e21

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

lua/debugprint/init.lua

+9-4
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,15 @@ M.debugprint_regular = function(opts)
195195
local filetype_config = get_filetype_config()
196196

197197
if filetype_config then
198-
opts.variable_name = utils.get_variable_name(
199-
global_opts.ignore_treesitter or opts.ignore_treesitter,
200-
filetype_config
201-
)
198+
local ignore_treesitter
199+
200+
if global_opts.ignore_treesitter or opts.ignore_treesitter then
201+
-- Works around issue with optional types
202+
ignore_treesitter = true
203+
end
204+
205+
opts.variable_name =
206+
utils.get_variable_name(ignore_treesitter, filetype_config)
202207

203208
if not opts.variable_name then
204209
return

0 commit comments

Comments
 (0)