Big cleanup for a big commit.

This commit is contained in:
2026-07-15 13:42:14 +02:00
parent 7b642b5868
commit 0b82564494
19 changed files with 556 additions and 753 deletions
+35
View File
@@ -0,0 +1,35 @@
local M = {}
local function build(args)
if vim.fn.filereadable("build.sh") == 0 then
vim.notify("No build.sh found in current directory.", vim.log.levels.WARN)
return
end
vim.cmd("wall")
local command = "./build.sh"
if #args > 0 then
command = command .. " " .. table.concat(args, " ")
end
require("terminal").send("clear && " .. command)
end
function M.setup()
vim.api.nvim_create_user_command(
"Build",
function(opts) build(opts.fargs) end,
{
nargs = "*",
desc = "Run project build.sh",
}
)
local map = vim.keymap.set
map("n", "<C-Space>", function() build({}) end, { desc = "Build project", })
map("t", "<C-Space>", function() build({}) end, { desc = "Build project", })
end
return M