[nvim] Add the nvim config paths to &path when opening nvim/init.lua
This commit is contained in:
parent
eeeb516897
commit
0a35616613
1 changed files with 10 additions and 0 deletions
10
config/nvim/ftplugin/lua.lua
Normal file
10
config/nvim/ftplugin/lua.lua
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue