# QQdock.nvim Persistent adaptive terminal dock for Neovim. 每次按 `` 打开 shell,聊完 Reasonix 按 `` 隐藏,再按回来——对话还在。横屏自动右侧分屏,竖屏自动下方分屏。 ## 安装 ```lua -- lazy.nvim { 'newbie/QQdock.nvim', url = 'https://git.qyhhh.top/newbie/QQdock.nvim', dependencies = { 'akinsho/toggleterm.nvim' }, config = function() local Q = require('QQdock') vim.keymap.set({ 'n', 'i' }, '', Q.shell, { noremap = true }) vim.keymap.set('n', '', function() Q.open('reasonix') end) vim.keymap.set('n', 'gg', function() Q.open('lazygit') end) end, } ``` ## 用法 ```lua local Q = require('QQdock') Q.shell() -- 普通 shell Q.open('reasonix') -- Reasonix AI agent Q.open('lazygit') -- lazygit Q.open('btm') -- 系统监控 Q.open('yazi') -- 文件管理器 ``` ## API | 函数 | 参数 | 作用 | |------|------|------| | `Q.shell()` | — | 打开/关闭持久 shell | | `Q.open(cmd)` | cmd | 打开/关闭指定命令的持久终端 | ## 特性 - **持久化** — toggle 显隐,终端状态保留 - **自适应** — 横屏右侧 45%,竖屏下方 40% - **轻量** — 仅依赖 toggleterm.nvim ## Development ### Run tests ```bash luarocks test --local # or busted ``` ## License MIT