Update c.lua

This commit is contained in:
DarthMooMancer
2025-03-10 14:21:53 -04:00
parent 078b095d6e
commit 77aeb47236
+9
View File
@@ -283,6 +283,15 @@ function M.build()
end end
function M.run() function M.run()
-- Get the current file's directory
local current_dir = vim.fn.expand("%:p:h")
-- Try to find the root of the project by matching the path
local project_root = current_dir:match("(.*)/src")
if not project_root then
print("Error: src directory not found.")
return
end
-- Define the build directory -- Define the build directory
local build_dir = project_root .. "/build" local build_dir = project_root .. "/build"