mirror of
https://github.com/nvim-lua/kickstart.nvim.git
synced 2026-05-14 08:23:48 +00:00
Make the custom.plugins loading cross-platform
This commit is contained in:
parent
f9b6223918
commit
c227278c56
@ -4,10 +4,10 @@
|
|||||||
-- See the kickstart.nvim README for more information
|
-- See the kickstart.nvim README for more information
|
||||||
|
|
||||||
-- Iterate over all Lua files in the plugins directory and load them
|
-- Iterate over all Lua files in the plugins directory and load them
|
||||||
local plugins_dir = vim.fn.stdpath 'config' .. '/lua/custom/plugins'
|
local plugins_dir = vim.fs.joinpath(vim.fn.stdpath 'config', 'lua', 'custom', 'plugins')
|
||||||
for _, file in ipairs(vim.fn.readdir(plugins_dir)) do
|
for file_name, type in vim.fs.dir(plugins_dir) do
|
||||||
if file:match '%.lua$' and file ~= 'init.lua' then
|
if type == 'file' and file_name:match '%.lua$' and file_name ~= 'init.lua' then
|
||||||
local module = file:gsub('%.lua$', '')
|
local module = file_name:gsub('%.lua$', '')
|
||||||
require('custom.plugins.' .. module)
|
require('custom.plugins.' .. module)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user