{
'maxmx03/terminal.nvim',
opts = {
layout = 'float' -- below
size = 0.7 -- value between 0 and 1, 0.7 == 70%
},
}
Plug 'maxmx03/terminal.nvim'
lua << EOF
local terminal = require('terminal')
terminal.setup({
layout = 'float',
size = 0.7
})
EOF
-- Open terminal in normal mode with F3
map("n", "<f3>", "<cmd>TermOpen<cr>", { silent = true })
-- Close terminal in terminal mode with F3
map("t", "<f3>", "<cmd>TermClose<cr>", { silent = true })
-- Hide terminal in terminal mode with F3
map("t", "<f3>", "<cmd>TermHide<cr>", { silent = true })
-- Open terminal and run a specific command (e.g., `make`) with F4
map("n", "<f4>", "<cmd>TermOpen make<cr>", { silent = true })
Check out the Wiki