Skip to content

Commit 4642440

Browse files
committed
refactor(nvim): wrap .nvim.lua in IIFE for local scoping
1 parent 19798ea commit 4642440

1 file changed

Lines changed: 14 additions & 12 deletions

File tree

.nvim.lua

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
local ok, telescope = pcall(require, "telescope")
2-
if not ok then
3-
return
4-
end
1+
(function()
2+
local ok, telescope = pcall(require, "telescope")
3+
if not ok then
4+
return
5+
end
56

6-
local ok_config, config = pcall(require, "telescope.config")
7-
local current = ok_config and config.values.file_ignore_patterns or {}
8-
table.insert(current, "^docs/plans/")
7+
local ok_config, config = pcall(require, "telescope.config")
8+
local current = ok_config and config.values.file_ignore_patterns or {}
9+
table.insert(current, "^docs/plans/")
910

10-
telescope.setup({
11-
defaults = {
12-
file_ignore_patterns = current,
13-
},
14-
})
11+
telescope.setup({
12+
defaults = {
13+
file_ignore_patterns = current,
14+
},
15+
})
16+
end)()

0 commit comments

Comments
 (0)