Update c.lua

This commit is contained in:
DarthMooMancer
2025-03-13 14:37:53 -04:00
parent 8340480a82
commit 293c2df3b4
+1 -4
View File
@@ -139,10 +139,7 @@ function M.create_new_file()
if not class_name or class_name == "" then return print("File creation canceled.") end if not class_name or class_name == "" then return print("File creation canceled.") end
local root_dir = M.get_project_root() local root_dir = M.get_project_root()
if not root_dir then return print("Error: Project root not found.") end if not root_dir then return print("Error: Project root not found.") end
local file_path = root_dir .. "/src/" .. class_name .. ".c" write_file(root_dir .. "/src/" .. class_name .. ".c", "")
assert(io.open(file_path, "w")):close()
vim.cmd("edit " .. file_path)
-- print(" " .. class_name .. ".c created successfully!")
end) end)
end end