Added more editor features to support Golang, sql and git

This commit is contained in:
2026-01-19 19:31:11 -07:00
parent a9b956e141
commit 3b41bd1552
16 changed files with 184 additions and 46 deletions

View File

@@ -1,8 +0,0 @@
return {
name = "go test",
builder = function()
return {
cmd = { "go", "test", "./..." },
}
end,
}

View File

@@ -0,0 +1,15 @@
return {
name = "go: benchmarks",
desc = "Run Go benchmarks with memory stats",
builder = function()
return {
cmd = { "go", "test" },
args = { "-bench=.", "-benchmem", "./..." },
components = {
"default",
"on_output_quickfix",
{ "on_complete_notify", statuses = { "SUCCESS", "FAILURE" } },
},
}
end,
}

View File

@@ -0,0 +1,20 @@
return {
name = "go: cpu profile",
desc = "Generate CPU profile (cpu.out)",
builder = function()
return {
cmd = { "go", "test" },
args = {
"-run=^$",
"-bench=.",
"-cpuprofile=cpu.out",
"./...",
},
components = {
"default",
"on_output_quickfix",
{ "on_complete_notify", statuses = { "SUCCESS" } },
},
}
end,
}

View File

@@ -0,0 +1,20 @@
return {
name = "go: mem profile",
desc = "Generate heap profile (mem.out)",
builder = function()
return {
cmd = { "go", "test" },
args = {
"-run=^$",
"-bench=.",
"-memprofile=mem.out",
"./...",
},
components = {
"default",
"on_output_quickfix",
{ "on_complete_notify", statuses = { "SUCCESS" } },
},
}
end,
}

View File

@@ -0,0 +1,10 @@
return {
name = "go test",
desc = "Run all tests",
builder = function()
return {
cmd = { "go", "test" },
args = { "./..." },
}
end,
}

View File

@@ -0,0 +1,20 @@
return {
name = "go: trace",
desc = "Generate execution trace (trace.out)",
builder = function()
return {
cmd = { "go", "test" },
args = {
"-run=^$",
"-bench=.",
"-trace=trace.out",
"./...",
},
components = {
"default",
"on_output_quickfix",
{ "on_complete_notify", statuses = { "SUCCESS" } },
},
}
end,
}