nvim/lua/plugs/QQdock.lua

35 lines
1.2 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- QQdock.nvim — 持久化自适应终端
-- 远程仓库https://git.qyhhh.top/newbie/QQdock.nvim
-- 本地临时副本lua/QQdock/init.lua根分区只读期间使用
--
-- 恢复读写后操作:
-- 1. 删掉 lua/QQdock/
-- 2. plugs.lua 追加 require('plugs.QQdock')
-- 3. keymap.lua 不用改require('QQdock') 自动找到 lazy 安装的版本)
return {
{
'newbie/QQdock.nvim',
url = 'https://git.qyhhh.top/newbie/QQdock.nvim.git',
dependencies = { 'akinsho/toggleterm.nvim' },
config = function()
local Q = require('QQdock')
pcall(Q.setup, Q, {
size = {
horizontal = 10,
vertical = 40,
},
})
G.map({
{ 'n', '<c-t>', Q.shell, { noremap = true } },
{ 'i', '<c-t>', Q.shell, { noremap = true } },
{ 'n', '<C-i>', function()
local cwd = vim.fn.getcwd()
Q.open('env XDG_STATE_HOME=' .. cwd .. '/.reasonix-state reasonix chat --continue')
end, { noremap = true } },
{ 'n', '<leader>gg', function() Q.open('lazygit') end, { noremap = true } },
})
end,
},
}