Go to file
QQ bf7bd9fe42 fix: reuse terminal instance after hide (is_open returns false on toggle) 2026-06-11 20:09:25 +08:00
.github/workflows init: QQdock.nvim — persistent adaptive terminal dock 2026-06-11 19:16:35 +08:00
lua/QQdock fix: reuse terminal instance after hide (is_open returns false on toggle) 2026-06-11 20:09:25 +08:00
plugin init: QQdock.nvim — persistent adaptive terminal dock 2026-06-11 19:16:35 +08:00
.busted update 2025-02-05 12:23:34 +08:00
.stylua.toml update 2023-06-16 16:10:41 +08:00
LICENSE Initial commit 2023-06-16 15:04:43 +08:00
README.md fix: remove custom size, use toggleterm defaults 2026-06-11 19:55:09 +08:00

README.md

QQdock.nvim

持久化自适应浮动终端管理器。

每次按 <c-t> 打开 shell聊完 Reasonix 按 <C-i> 隐藏,再按回来——对话还在。横屏自动右侧分屏,竖屏自动下方分屏。

安装

-- lazy.nvim
{
  'newbie/QQdock.nvim',
  dependencies = { 'akinsho/toggleterm.nvim' },
  config = function()
    -- QQdock 无全局配置,直接用
  end,
}

用法

local Q = require('QQdock')

Q.shell()                -- 普通 shell
Q.open('reasonix')       -- Reasonix AI agent
Q.open('lazygit')        -- lazygit
Q.open('btm')            -- 系统监控
Q.open('yazi')           -- 文件管理器

推荐键位

vim.keymap.set({ 'n', 'i' }, '<c-t>',      Q.shell, { noremap = true })
vim.keymap.set('n',          '<C-i>',       function() Q.open('reasonix') end)
vim.keymap.set('n',          '<leader>gg',  function() Q.open('lazygit') end)

API

函数 参数 作用
Q.shell() 打开/关闭持久 shell
Q.open(cmd) cmd 打开/关闭指定命令的持久终端

特性

  • 持久化 — toggle 显隐,终端状态保留
  • 自适应 — 横屏右侧分屏竖屏下方分屏toggleterm 默认尺寸)
  • 轻量 — 仅依赖 toggleterm.nvim无其他依赖

TODO

  • 翻译trans
  • 系统监控btop
  • 文件管理器yazi

协议

MIT