Skip to content

Commit 1432bd9

Browse files
committed
wrap with pcall
1 parent 3a0ed2f commit 1432bd9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lua/forester.lua

+6-4
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,12 @@ local function setup()
6262

6363
-- Make links followable with `gf`
6464

65-
local dirs = Config.tree_dirs()
66-
for _, v in pairs(dirs) do
67-
vim.opt.path:append(v)
68-
end
65+
local _ = pcall(function()
66+
local dirs = Config.tree_dirs()
67+
for _, v in pairs(dirs) do
68+
vim.opt.path:append(v)
69+
end
70+
end)
6971
vim.opt.suffixesadd:prepend(".tree")
7072
end
7173

0 commit comments

Comments
 (0)