From 9b946457daa4609f33df435a250c8e87495a1354 Mon Sep 17 00:00:00 2001 From: newbie Date: Sat, 6 Jan 2024 19:05:22 +0800 Subject: [PATCH] updae --- lua/lsp/go.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lua/lsp/go.lua b/lua/lsp/go.lua index ba8b2e7..a7f83ee 100644 --- a/lua/lsp/go.lua +++ b/lua/lsp/go.lua @@ -7,5 +7,13 @@ return { }, }, }, - } + }, + on_attach = function() + G.api.nvim_create_user_command('R', function() + G.cmd [[set splitbelow]] + G.cmd [[sp]] + G.cmd [[term go run %]] + G.cmd [[startinsert]] + end, {}) + end }