adding notes

This commit is contained in:
Carlos
2025-05-04 23:17:54 -04:00
parent 47edf65083
commit 4cf1cf7554
12 changed files with 399 additions and 183 deletions

View File

@@ -0,0 +1,27 @@
vim.api.nvim_create_user_command("RunProject", function()
local config_path = ".nvim/project.lua"
if vim.fn.filereadable(config_path) == 0 then
vim.notify("No project config found. Run `:e` on any file to generate it.", vim.log.levels.WARN)
return
end
local config = loadfile(config_path)()
if config and config.run then
vim.cmd("vsplit | terminal " .. config.run)
else
vim.notify("Run command not found in project config.", vim.log.levels.ERROR)
end
end, {})
vim.api.nvim_create_user_command("DebugProject", function()
local config_path = ".nvim/project.lua"
if vim.fn.filereadable(config_path) == 0 then
vim.notify("No project config found. Run `:e` on any file to generate it.", vim.log.levels.WARN)
return
end
local config = loadfile(config_path)()
if config and config.debug then
vim.cmd("vsplit | terminal " .. config.debug)
else
vim.notify("Debug command not found in project config.", vim.log.levels.ERROR)
end
end, {})