Skip to content

Commit 1fc2ab7

Browse files
committed
fix: pcall get_parser call
1 parent 76d80c3 commit 1fc2ab7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lua/nvim-dap-virtual-text/virtual_text.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,11 @@ function M.set_virtual_text(stackframe, options)
112112
if not lang then
113113
return
114114
end
115-
parser = parsers.get_parser(buf, lang)
115+
local ok
116+
ok, parser = pcall(parsers.get_parser, buf, lang)
117+
if not ok then
118+
return
119+
end
116120
end
117121

118122
local scope_nodes = {}

0 commit comments

Comments
 (0)