18 lines
866 B
Lua
18 lines
866 B
Lua
|
local function map(mode, lhs, rhs, desc)
|
||
|
local opts = { silent = true, noremap = true, desc = desc or '' }
|
||
|
vim.keymap.set(mode, lhs, rhs, opts)
|
||
|
end
|
||
|
|
||
|
map('n', '<leader>ga', '<Cmd>GoCodeAction<CR>', 'Go: Code [A]ction')
|
||
|
map('n', '<leader>gA', '<Cmd>GoCodeLenAct<CR>', 'Go: Code Lens [A]ction')
|
||
|
map('n', '<leader>gb', '<Cmd>GoBuild<CR>', 'Go: [B]uild')
|
||
|
map('n', '<leader>gr', '<Cmd>GoRun<CR>', 'Go: [R]un')
|
||
|
map('n', '<leader>gd', '<Cmd>GoDebug<CR>', 'Go: [D]ebug')
|
||
|
map('n', '<leader>gt', '<Cmd>GoTest<CR>', 'Go: [T]est')
|
||
|
map('n', '<leader>gf', '<Cmd>GoFmt<CR>', 'Go: [F]ormat')
|
||
|
map('n', '<leader>gi', '<Cmd>GoImports<CR>', 'Go: [I]mports')
|
||
|
map('n', '<leader>gg', '<Cmd>GoGet<CR>', 'Go: [G]et')
|
||
|
|
||
|
map('n', '<leader>gN', '<Cmd>GoInstallBinaries<CR>', 'Go: I[N]stall Dependent Tools')
|
||
|
map('n', '<leader>gU', '<Cmd>GoUpdateBinaries<CR>', 'Go: [U]pdate Dependent Tools')
|