Skip to content

Commit 51cf72d

Browse files
committed
Revert "fix(nvim): require -> dofile"
This reverts commit 9ea8209.
1 parent 1602120 commit 51cf72d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

private_dot_config/nvim/lua/plugins.lua.tmpl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,14 @@ return require('packer').startup(
1313
local use = require('packer').use
1414
local plugins = io.popen('find "'..'{{ .chezmoi.homeDir }}/.config/nvim/lua/plugins-d/'..'" -type f')
1515
for plugin in plugins:lines() do
16-
local file = string.match(plugin,"({{ .chezmoi.homeDir }}/[.]config/nvim/lua/.*_.*[.]lua)")
17-
if file ~= nil then
18-
use(dofile(file))
16+
local part1, part2 = string.match(plugin,"{{ .chezmoi.homeDir }}/[.]config/nvim/lua/(.*)_(.*)[.]lua")
17+
if part1 ~= nil and part2 ~= nil then
18+
plugin = part1 .. '_' .. part2
19+
else
20+
plugin = ''
21+
end
22+
if plugin ~= '' then
23+
use(require(plugin))
1924
end
2025
end
2126
if is_startup then

0 commit comments

Comments
 (0)