diff options
| author | Thomas Vanbesien <tvanbesi@proton.me> | 2026-06-30 01:24:14 +0200 |
|---|---|---|
| committer | Thomas Vanbesien <tvanbesi@proton.me> | 2026-06-30 01:24:14 +0200 |
| commit | 9466f9ae9825a7f1ee7bbbee3d1e3b423d06f0f4 (patch) | |
| tree | 07a9807fdaa2b1665ca34ee272167c11e1473dde /plugin/50-color.lua | |
| parent | 61efaa62c405c6f0c03f4f52e1003bc1a3569b88 (diff) | |
| download | nvim-config-dev.tar.gz nvim-config-dev.zip | |
feat(terminal): follow output by default with :TerminalFollow toggledev
When follow mode is on for a terminal buffer, leaving terminal mode
jumps to the bottom (G) so the view tracks the latest output. It is a
buffer-scoped toggle, on by default for new terminals.
- Add :TerminalFollow command and <Leader>F mapping toggling
vim.b.terminal_follow
- A TermLeave autocmd does the G when the flag is set; TermOpen enables
it by default
- Show the state as a +T flag in the statusline
Diffstat (limited to 'plugin/50-color.lua')
| -rw-r--r-- | plugin/50-color.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugin/50-color.lua b/plugin/50-color.lua index 4cdbad0..c88e34b 100644 --- a/plugin/50-color.lua +++ b/plugin/50-color.lua @@ -80,11 +80,13 @@ local function spell_status() end --[[ Custom status flags: `+F` when formatting is on for the buffer, `+H` when LSP inlay hints are on, -`+R` when disk-change autoreload is enabled (see 50-autoreload.lua), followed by the spell flag. ]] +`+R` when disk-change autoreload is enabled (see 50-autoreload.lua), `+T` when terminal follow is on +(see :TerminalFollow), followed by the spell flag. ]] local function statuses() return (vim.b.format and "+F" or "") .. (vim.lsp.inlay_hint.is_enabled({ bufnr = 0 }) and "+H" or "") .. (vim.g.autoreload and "+R" or "") + .. (vim.b.terminal_follow and "+T" or "") .. (vim.o.spell and spell_status() or "") end |
