32 lines
549 B
Lua
32 lines
549 B
Lua
local status_ok, toggleterm = pcall(require, "toggleterm")
|
|
if not status_ok then
|
|
return
|
|
end
|
|
|
|
toggleterm.setup {
|
|
shade_terminals = true,
|
|
float_opts = {
|
|
border = 'shadow',
|
|
},
|
|
on_open = function()
|
|
vim.opt.cmdheight = 0
|
|
end,
|
|
on_close = function()
|
|
vim.opt.cmdheight = 1
|
|
end
|
|
}
|
|
|
|
local term = require('toggleterm.terminal').Terminal
|
|
local glow = term:new({
|
|
cmd = "glow",
|
|
hidden = true,
|
|
direction = "float",
|
|
float_opts = {
|
|
border = "shadow",
|
|
width = 120,
|
|
height = 50,
|
|
}
|
|
})
|
|
|
|
function _glow() glow:toggle() end
|