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

@@ -83,11 +83,17 @@ map("n", "<leader>tc", "<cmd>Coverage<cr>", { desc = "Show coverage" })
-- Go benchmark
map("n", "<leader>gb", function()
vim.cmd("!go test -bench . ./...")
vim.cmd("!go test -bench=. -benchmem ./...")
end, { desc = "Go benchmarks" })
map("n", "<leader>gp", function()
vim.cmd("!go test -cpuprofile cpu.out && go tool pprof cpu.out")
map("n", "<leader>gpc", function()
vim.cmd("!go test -run=^$ -bench=. -cpuprofile cpu.out ./...")
end, { desc = "Go CPU profile" })
map("n", "<leadger>gpm", function()
vim.cmd("!go test -run=^$ -bench=. -memprofile mem.out ./...")
end, { desc = "Go memory profile" })
map("n", "<leader>gpt", function()
vim.cmd("!go test -run=^$ -bench. -trace trace.out ./...")
end, { desc = "Go trace profile" })
-- Overseer
map("n", "<leader>or", "<cmd>OverseerRun<cr>", { desc = "Run task" })
@@ -102,3 +108,6 @@ map("n", "<leader>sc", vim.lsp.buf.outgoing_calls, { desc = "Outgoing calls" })
map("n", "<leader>xx", "<cmd>Trouble diagnostics toggle<cr>")
map("n", "<leader>xw", "<cmd>Trouble workspace_diagnostics<cr>")
map("n", "<leader>xt", "<cmd>Trouble todo<cr>")
-- Git Support
map("n", "<leader>gg", "<cmd>Neogit<cr>", { desc = "Neogit"})