nvim/lua/lsp/go.lua

19 lines
449 B
Lua
Raw Normal View History

2024-01-06 18:44:41 +08:00
return {
2024-01-06 19:05:22 +08:00
on_attach = function()
G.api.nvim_create_user_command('R', function()
G.cmd [[set splitbelow]]
G.cmd [[sp]]
G.cmd [[term go run %]]
2024-01-08 14:23:13 +08:00
G.cmd [[resize 10]]
2024-01-06 19:05:22 +08:00
G.cmd [[startinsert]]
end, {})
2024-01-26 15:32:49 +08:00
G.api.nvim_create_user_command('Rgin', function()
G.cmd [[set splitbelow]]
G.cmd [[sp]]
G.cmd [[term go run ./main.go]]
G.cmd [[resize 10]]
G.cmd [[startinsert]]
end, {})
2024-01-06 19:05:22 +08:00
end
2024-01-06 18:44:41 +08:00
}