summaryrefslogtreecommitdiff
path: root/lua/config/projects.lua
diff options
context:
space:
mode:
authorRaymaekers Luca <luca@spacehb.net>2025-03-17 15:34:15 +0100
committerRaymaekers Luca <luca@spacehb.net>2025-03-17 15:34:15 +0100
commitda7035666495a278bfc7885e4d9f11557f210357 (patch)
treedee15f2eaa55b7e392bff39aaff2e2f966751377 /lua/config/projects.lua
parent53f6e19f84ba06bbf143339deba84bc51cd6706e (diff)
checkpoint
Diffstat (limited to 'lua/config/projects.lua')
-rw-r--r--lua/config/projects.lua24
1 files changed, 24 insertions, 0 deletions
diff --git a/lua/config/projects.lua b/lua/config/projects.lua
new file mode 100644
index 0000000..9a6ecda
--- /dev/null
+++ b/lua/config/projects.lua
@@ -0,0 +1,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