blob: 9a6ecda46c4e120474123e122b71bff63aa9a832 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
local M = {}
-- TODO: windows
local HOME = os.getenv("HOME")
local CWD = vim.fn.getcwd()
-- NOTE(luca): This must be global so that the path can be referenced in the Options function
M.Projects = {
Metac = {
Path = HOME .. "/proj/metac",
Options = function()
vim.o.makeprg = M.Projects.Metac.Path .. "/misc/build.sh"
end,
},
}
for _, Project in pairs(M.Projects) do
if string.find(CWD, Project.Path) then
M.IsInProject = true
Project.Options()
end
end
return M
|