-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.lua
executable file
·31 lines (27 loc) · 1.21 KB
/
init.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
-- ╭─────────────────────────────────────────────╮
-- │ Written by Fady nagh from http://fadyio.com │
-- │ Email:[email protected] │
-- │ Github: @fadyio │
-- ╰─────────────────────────────────────────────╯
-- Neovim Lua script to dynamically load .lua config files
function requirePath(path)
local files = io.popen('find "$HOME"/.config/nvim/lua/' .. path .. " -type f")
for file in files:lines() do
local req_file = file:gmatch("%/lua%/(.+).lua$")({ 0 }):gsub("/", ".")
status_ok, _ = pcall(require, req_file)
if not status_ok then
vim.notify("Failed loading " .. req_file, vim.log.levels.ERROR)
end
end
end
------------------------------------------------------
--- All My plugins and it's configurations
--- All My Settings
require("options")
-- All my Plugins
require("Plugins")
--- All My Keybindings
require("keybindings")
--- load autocommands
require("autocmds")
requirePath("config")