From 3ed7615c2b3f9be1b5c3f260147fcfe97eb7bafd Mon Sep 17 00:00:00 2001 From: Simon Lasbrugnas Date: Tue, 10 Dec 2024 15:00:24 +0100 Subject: [PATCH] feat: add q to open the Go scratchpad (Only for Go files) Opens my ~/personal/Go/test/main.go file in the current buffer --- lua/custom/lsp/config/gopls.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/custom/lsp/config/gopls.lua b/lua/custom/lsp/config/gopls.lua index e28704e..ebd70c4 100644 --- a/lua/custom/lsp/config/gopls.lua +++ b/lua/custom/lsp/config/gopls.lua @@ -23,6 +23,8 @@ return { -- run the current go file in a vertical split terminal pane vim.keymap.set("n", "", "vsplit term://go run %") + -- open the Go scratchpad + vim.keymap.set("n", "q", "e ~/personal/Go/test/main.go | normal 6G2|") -- Auto organize imports on save vim.api.nvim_create_autocmd("BufWritePre", {