Compare commits

..

3 Commits

8 changed files with 43 additions and 80 deletions

View File

@ -4,8 +4,6 @@
## 目录结构
```
init.lua # 入口:安装 lazy.nvim → keymaps → 分支判断
lua/

View File

@ -1,2 +0,0 @@
return {
}

View File

@ -1,11 +0,0 @@
return {
on_attach = function()
G.api.nvim_create_user_command('R', function()
G.cmd [[set splitbelow]]
G.cmd [[sp]]
G.cmd [[term python3 %]]
G.cmd [[resize 10]]
G.cmd [[startinsert]]
end, {})
end
}

View File

@ -9,5 +9,5 @@ return {
require('plugs.theme'),
require('plugs.edit-plugs'),
require('plugs.dev'),
require('plugs.ai'),
require('plugs.QQdock'),
}

36
lua/plugs/QQdock.lua Normal file
View File

@ -0,0 +1,36 @@
-- 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()
require('QQdock').setup({
size = {
horizontal = 10,
vertical = 40,
},
keymaps = {
shell = { 'n', '<c-t>' },
shell_i = { 'i', '<c-t>' },
reasonix = { 'n', '<C-i>' },
lazygit = { 'n', '<leader>gg' },
},
commands = {
reasonix = function()
local cwd = vim.fn.getcwd()
return 'env XDG_STATE_HOME=' .. cwd .. '/.reasonix-state reasonix chat --continue'
end,
},
})
end,
},
}

View File

@ -1,27 +0,0 @@
-- 这里用来coplit AI的配置
return {
{
-- Copilot 懒加载:只在插入模式需要(和 nvim-cmp 共用 Tab 键cmp 改用 C-n/C-p 避让)
'github/copilot.vim', -- github copilot
event = "InsertEnter",
},
{
-- lazy.nvim
'newbieQQ/slot.nvim',
url = 'https://github.com/newbieQQ/slot.nvim',
config = function()
require('slot').setup({
commands = {
reasonix = 'reasonix -c || reasonix',
lazygit = 'lazygit',
},
keymaps = {
shell = { 'n', '<c-t>' },
shell_i = { 'i', '<c-t>' },
reasonix = { 'n', '<C-i>' },
lazygit = { 'n', '<leader>gg' },
},
})
end,
}
}

View File

@ -1,4 +1,5 @@
return {
'vijaymarupudi/nvim-fzf', -- fzf
{
-- surround 和 wildfire 配合有神奇的效果
'tpope/vim-surround',
@ -26,6 +27,11 @@ return {
-- {
-- 'tpope/vim-commentary',
-- },
{
-- Copilot 懒加载:只在插入模式需要(和 nvim-cmp 共用 Tab 键cmp 改用 C-n/C-p 避让)
'github/copilot.vim', -- github copilot
event = "InsertEnter",
},
{
'windwp/nvim-autopairs',
event = "InsertEnter",

View File

@ -1,41 +1,4 @@
return {
{
-- git 修改标记sign column 增删改色块)
'lewis6991/gitsigns.nvim',
event = "BufReadPre",
config = function()
require('gitsigns').setup({
signs = {
add = { text = '' },
change = { text = '' },
delete = { text = '' },
topdelete = { text = '' },
changedelete = { text = '' },
untracked = { text = '' },
},
signcolumn = true,
numhl = true,
linehl = false,
word_diff = false,
watch_gitdir = {
interval = 1000,
follow_files = true,
},
current_line_blame = false,
-- on_attach = function(bufnr)
-- local gs = package.loaded.gitsigns
-- G.map({
-- { 'n', ']c', gs.next_hunk, { buffer = bufnr } },
-- { 'n', '[c', gs.prev_hunk, { buffer = bufnr } },
-- { 'n', '<leader>hs', gs.stage_hunk, { buffer = bufnr } },
-- { 'n', '<leader>hr', gs.reset_hunk, { buffer = bufnr } },
-- { 'n', '<leader>hp', gs.preview_hunk, { buffer = bufnr } },
-- { 'n', '<leader>hb', gs.blame_line, { buffer = bufnr } },
-- })
-- end,
})
end,
},
{
'folke/tokyonight.nvim',
config = function()