feat(lsp): add <leader><CR> to run go main % (only for Go files)

Keybind is added automatically on gopls attach
This commit is contained in:
Simon Lasbrugnas 2024-12-09 22:04:57 +01:00
parent 61b29c4ba6
commit dba90a94cf
Signed by untrusted user who does not match committer: simon
GPG key ID: 86039876BA6ED8DE

View file

@ -21,6 +21,9 @@ return {
end,
})
-- run the current go file in a vertical split terminal pane
vim.keymap.set("n", "<leader><CR>", "<cmd>vsplit term://go run %<CR>")
-- Auto organize imports on save
vim.api.nvim_create_autocmd("BufWritePre", {
buffer = bufnr,