aboutsummaryrefslogtreecommitdiff
path: root/lua/gabrielgio/go.lua
blob: e0b27b7e74ca76abcba37f63e3c8f52fa1e29da1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
local key = require("gabrielgio.key")

vim.g["go_def_mode"] = "gopls"
vim.g["go_info_mode"] = "gopls"
key.nnoremap("<leader>r", ":GoReferrers<cr>")
key.nnoremap("<leader>a", ":GoAlternate<cr>")
key.nnoremap("<leader>s", ":GoRename<cr>")
key.nnoremap("<leader>i", ":GoImplements<cr>")
key.nnoremap("<leader>o", ":GoIfErr<cr>")
key.nnoremap("<leader>gs", ":GoDebugStart .<cr>")
key.nnoremap("<leader>gc", ":GoDebugContinue<cr>")
key.nnoremap("<leader>gb", ":GoBuild<cr>")
key.nnoremap("<leader>gr", ":GoDebugRestart<cr>")
key.nnoremap("<leader>gn", ":GoRun<cr>")
key.nnoremap("<leader>gt", ":GoTest<cr>")
key.nnoremap("<leader>ge", ':exec ":GoDebugPrint ".input("eval: ")<cr>')