Skip to content

Commit 40fc629

Browse files
committed
fix: Use tbl_get to support 0.8
1 parent 2313e5c commit 40fc629

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lua/debugprint/utils.lua

+1-6
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,7 @@ M.find_treesitter_variable = function(filetype_config)
182182
if obj.node == nil then
183183
return nil
184184
else
185-
if
186-
vim.list_contains(
187-
vim.tbl_keys(filetype_config),
188-
"find_treesitter_variable"
189-
)
190-
then
185+
if vim.tbl_get(filetype_config, "find_treesitter_variable") then
191186
return filetype_config.find_treesitter_variable(obj)
192187
else
193188
return obj.node_text

0 commit comments

Comments
 (0)