feat: add <leader>q to open the Go scratchpad (Only for Go files)

Opens my ~/personal/Go/test/main.go file in the current buffer
This commit is contained in:
Simon Lasbrugnas 2024-12-10 15:00:24 +01:00
parent dba90a94cf
commit 3ed7615c2b
Signed by untrusted user who does not match committer: simon
GPG key ID: 86039876BA6ED8DE

View file

@ -23,6 +23,8 @@ return {
-- run the current go file in a vertical split terminal pane -- run the current go file in a vertical split terminal pane
vim.keymap.set("n", "<leader><CR>", "<cmd>vsplit term://go run %<CR>") vim.keymap.set("n", "<leader><CR>", "<cmd>vsplit term://go run %<CR>")
-- open the Go scratchpad
vim.keymap.set("n", "<leader>q", "<cmd>e ~/personal/Go/test/main.go | normal 6G2|<CR>")
-- Auto organize imports on save -- Auto organize imports on save
vim.api.nvim_create_autocmd("BufWritePre", { vim.api.nvim_create_autocmd("BufWritePre", {