nvim/lua/lsp/c.lua
2024-01-06 00:30:26 +08:00

11 lines
242 B
Lua

return {
on_attach = function()
G.api.nvim_create_user_command('R', function()
G.cmd [[set splitbelow]]
G.cmd [[sp]]
G.cmd [[term g++ "%" -o "%<" && ./"%<" && rm "%<"]]
G.cmd [[startinsert]]
end, {})
end
}