forked from dreamsofcode-io/neovim-go-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mappings.lua
53 lines (49 loc) · 909 Bytes
/
mappings.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
local M = {}
M.dap = {
plugin = true,
n = {
["<leader>db"] = {
"<cmd> DapToggleBreakpoint <CR>",
"Add breakpoint at line"
},
["<leader>dus"] = {
function ()
local widgets = require('dap.ui.widgets');
local sidebar = widgets.sidebar(widgets.scopes);
sidebar.open();
end,
"Open debugging sidebar"
}
}
}
M.dap_go = {
plugin = true,
n = {
["<leader>dgt"] = {
function()
require('dap-go').debug_test()
end,
"Debug go test"
},
["<leader>dgl"] = {
function()
require('dap-go').debug_last()
end,
"Debug last go test"
}
}
}
M.gopher = {
plugin = true,
n = {
["<leader>gsj"] = {
"<cmd> GoTagAdd json <CR>",
"Add json struct tags"
},
["<leader>gsy"] = {
"<cmd> GoTagAdd yaml <CR>",
"Add yaml struct tags"
}
}
}
return M