[nvim] Add the nvim config paths to &path when opening nvim/init.lua

This commit is contained in:
Eryn Wells 2023-03-22 14:36:46 -07:00
parent eeeb516897
commit 0a35616613

View file

@ -0,0 +1,10 @@
-- Eryn Wells <eryn@erynwells.me>
local configPath = vim.fn.stdpath("config")
local fullPath = vim.fn.expand("%:p")
if string.find(fullPath, "nvim/init.lua") then
local dirname = vim.fn.expand("%:p:h")
vim.opt.path:prepend(dirname)
vim.opt.path:prepend(dirname .. "/lua")
end