[nvim] Move ftplugin/lua.lua to after/

This commit is contained in:
Eryn Wells 2023-03-24 21:28:04 -07:00
parent fabcbec363
commit 79757c36a2
2 changed files with 18 additions and 10 deletions

View file

@ -0,0 +1,18 @@
-- Eryn Wells <eryn@erynwells.me>
local expand = vim.fn.expand
local resolve = vim.fn.resolve
local stdpath = vim.fn.stdpath
local configPath = resolve(stdpath("config"))
local fullPath = resolve(expand("%:p"))
if string.find(fullPath, configPath) == 1 then
vim.opt_local.path = {
".",
"",
configPath .. "/**",
}
vim.opt_local.suffixesadd:append(".lua")
end

View file

@ -1,10 +0,0 @@
-- 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