Minimal float/bottom terminal for Neovim. Persists across buffers. ~250 lines.
- Toggle a centered floating terminal
- Toggle a bottom-split terminal
- Both terminals persist when switching buffers
- Auto-detects project root (
.git,Makefile,package.json) - Tiny footprint, no dependencies
- Neovim >= 0.10
{
'vyrx-dev/sloat',
opts = {},
keys = {
{ ';t', '<cmd>Sloat float<cr>', mode = { 'n', 't' } },
{ ';st', '<cmd>Sloat bottom<cr>' },
{ ';d', '<cmd>Sloat kill<cr>' },
},
}vim.pack.add('vyrx-dev/sloat')Then call require('sloat').setup() in your config.
Plug 'vyrx-dev/sloat'Then call require('sloat').setup() in your config.
Setup is optional — defaults work out of the box:
require('sloat').setup({
float = {
width = 0.5,
height = 0.6,
border = 'rounded', -- see :h nvim_open_win
},
bottom = {
height = 15,
},
root_patterns = { '.git', 'Makefile', 'package.json', 'Cargo.toml', 'go.mod' },
})When using lazy.nvim, pass options through the opts field instead of calling setup() directly.
root_patterns controls where the terminal opens — sloat walks up from the current file to find the nearest match and uses that as the working directory.
:Sloat float toggle floating terminal
:Sloat bottom toggle bottom terminal
:Sloat kill destroy all terminals
Press <Esc><Esc> to leave terminal mode.
MIT
