refactor: QQdock keymaps via setup() config, reasonix session per project

This commit is contained in:
QQ 2026-06-11 21:14:11 +08:00
parent 4b63cf2194
commit 1f4388fe17
1 changed files with 13 additions and 11 deletions

View File

@ -13,21 +13,23 @@ return {
url = 'https://git.qyhhh.top/newbie/QQdock.nvim.git', url = 'https://git.qyhhh.top/newbie/QQdock.nvim.git',
dependencies = { 'akinsho/toggleterm.nvim' }, dependencies = { 'akinsho/toggleterm.nvim' },
config = function() config = function()
local Q = require('QQdock') require('QQdock').setup({
pcall(Q.setup, Q, {
size = { size = {
horizontal = 10, horizontal = 10,
vertical = 40, vertical = 40,
}, },
}) keymaps = {
G.map({ shell = { 'n', '<c-t>' },
{ 'n', '<c-t>', Q.shell, { noremap = true } }, shell_i = { 'i', '<c-t>' },
{ 'i', '<c-t>', Q.shell, { noremap = true } }, reasonix = { 'n', '<C-i>' },
{ 'n', '<C-i>', function() lazygit = { 'n', '<leader>gg' },
},
commands = {
reasonix = function()
local cwd = vim.fn.getcwd() local cwd = vim.fn.getcwd()
Q.open('env XDG_STATE_HOME=' .. cwd .. '/.reasonix-state reasonix chat --continue') return 'env XDG_STATE_HOME=' .. cwd .. '/.reasonix-state reasonix chat --continue'
end, { noremap = true } }, end,
{ 'n', '<leader>gg', function() Q.open('lazygit') end, { noremap = true } }, },
}) })
end, end,
}, },