Added more editor features to support Golang, sql and git
This commit is contained in:
@@ -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"})
|
||||
|
||||
Reference in New Issue
Block a user